Holomorphic function with real values on boundary I am wondering if the next statement is true: 
If $f:\Omega \rightarrow\mathbb{C}$ be an holomorphic function where $\Omega$ is a bounded connected subset of $\mathbb{C}$ such that for every $z\in \partial\Omega$ we have that $f(z)\in \mathbb{R}$ then f is constant and $f$ analytic and continuous on closure of $\Omega$.
I know that this is true if $\Omega$ is a symetric set because of schwarz reflection principle and Liouville theorem.
And the statement hold if $\Omega$ a disk of radius $R$ centered at a point $z_0$ because then composing $f$ with then function $g(z)=z-z_0$. 
We would have have that $ f\circ g : D(0,R) \rightarrow\mathbb{C}$ so by the preceding argument we have $f\circ g$ is constant so is $f$. 
The condition that $\Omega$ is bounded is important since there exist function being real on boundary of $\Omega$ but not constant. For exemple $Id:H \rightarrow \mathbb{C}$  where $H=\{z \mid \Im z \gt 0\}$
But I don't know if this is true in general cases and I didn't find counterexample so if someone can give me an answer it would be super great 
Thanks in advance ! 
 A: The answer will depend on how regular do you want the function $f$ to be near $\delta\Omega$ and on topological properties of $\Omega$ that you are probably assuming, but not writing. For example:
The function $$g(z)=\begin{cases}\frac{\frac{z}{2}+\frac{1}{2}}{\frac{zi}{2}-\frac{i}{2}},&z\neq 1\\0,&z=1\end{cases}$$ satisfies that for $|z|=1$ 
$$\overline{g(z)}=\frac{\frac{\overline{z}}{2}+\frac{1}{2}}{-\frac{\overline{z}i}{2}+\frac{i}{2}}=\frac{\frac{1}{2z}+\frac{1}{2}}{-\frac{i}{2z}+\frac{i}{2}}=\frac{\frac{z}{2}+\frac{1}{2}}{\frac{zi}{2}-\frac{i}{2}}=g(z)$$
Therefore, it takes real values on the unit circle. This function takes the unit disc to the upper half-plane. Therefore, it is essentially your own example of the identity on the upper half-plane, after the conformal transformation $g(z)$.

Should $f$ be continuous on $\overline{\Omega}$? In that case we have that $f=\overline{f}$ on $\delta\Omega$. Therefore $f-\overline{f}$ is harmonic, zero on the boundary, and continuous on $\Omega$. Therefore, by the maximum principle, it is zero in the interior of the domain. Hence $f=\overline{f}$, which implies that $f$ is locally constant.

There is also the connectivity of the set $\Omega$. If $\Omega$ is not connected, $f$ could be real and constant on each connected component, but not constant over all.
A: You want to assume $f$ is analytic in a neighbourhood of $\Omega$.  The $\text{Im}(f(z))$ is harmonic, and $0$ on $\partial \Omega$.  If it were not identically $0$, it would have a maximum or minimum in $\Omega$, and that is impossible.
