# Holomorphic function constant on the boundary

Let $$D$$ be a domain and $$f$$ holomorphic on $$D$$ and continuous on its closure $$\overline D$$. Now, if $$f$$ doesn't have any zeros in $$D$$ one can show that if $$f$$ is constant on $$\partial D$$ it must be constant on $$D$$. Does this hold as well if $$f$$ has any zeros inside $$D$$? If not, can someone provide an example?

You need some assumptions about the boundary of $$D$$, namely that the boundary is not a discrete subset of the complex plane. Otherwise, your claim is clearly false (think of $$D={\mathbb C}- \{a_1,...,a_n\}$$ and a certain degree $$n$$ polynomial on $${\mathbb C}$$).
Theorem. Suppose that $$D$$ is a domain in $${\mathbb C}$$ and $$p\in \partial D$$ is a non-isolated boundary point. Suppose that $$U\subset \partial D$$ is a neighborhood of $$p$$ (in the subspace topology). Assume that $$f: D\to {\mathbb C}$$ is holomorphic and has continuous extension to $$D\cup U$$ which is constant on $$U$$. Then $$f$$ is constant.