Consider the following theorem (see references at the end): If $X$ is a connected and compact complex manifold, then any holomorphic function $f : X \rightarrow \mathbb{C}$ is constant.
What about $X = \{z \in \mathbb{C} : |z| \leq 1\}$ and $f(z) = \cos(z)$? $\cos(z)$ is a holomorphic function on the domain $X$ but certainly not constant. What is wrong with this 'counter example'?
Many thanks.
The above theorem can be found, for instance, Theorem 1.11 of Wells' book: Differential Analysis on Complex Manifolds, or page 192 of: https://books.google.co.uk/books?id=KsGbqTBjyoUC&pg=PA192&lpg=PA192&dq=holomorphic+function+on+compact+manifold&source=bl&ots=iaxcDjiJuv&sig=1J4A2idAZdYaIqlQe7qPVf0QapA&hl=en&sa=X&ei=CmX4VKLUA-PR7Ab734GYAg&ved=0CEQQ6AEwBQ#v=onepage&q=holomorphic%20function%20on%20compact%20manifold&f=false
$X$ is not a manifold, as any point of its boundary cannot have a neighbourhood analytically isomorphic to an open ball.