Theorem: Let $f$ be analytical on $\Omega \subset \mathbb C$ and let $|f(z)|=k$ be a constant in $\Omega$. Then it follows that $f$ is constant.
Question: My book now says "it's clear that the theorem is wrong if $f$ is a complex function of real variables... But that kind of confuses me. Let's pick $f(z)=1$. Then $f$ is analytical on $\mathbb C$, especially on $\Omega$. Also we have $|f(z)|=1,\quad \forall z \in \Omega$ but $f$ is a complex function of a real variable, and apparently, that shouldn't work.
Can maybe elaborate someone what exactly is meant with that theorem?