The Schwarz reflection principle says (Serge Lang, Complex Analysis, 1993):
Let $U^+$ be a connected open set in the upper half plane, and suppose that the boundary of $U^+$ contains an open interval $I$ of real numbers. Let $U^-$ be the reflection of $U^+$ across the real axis. If $f$ is a function on $U^+\cup I$, analytic on $U^+$ and continuous on I, and f is real valued on $I$, then $f$ has a unique analytic continuation on $U^+\cup I\cup U^-$.
I wonder if the assumption "$f$ is continuous on $I$" could be replaced by the weaker assumption that "$\text{Im}(f)$ is continuous on $I$", since the analogue reflection theorem for harmonic functions only needs such a weaker assumption. Or is there a counter-example?