TITLE: Striking applications of Morera's theorem
QUESTION [14 upvotes]: Morera's theorem is an underappreciated theorem in complex analysis. I have been struck by the simplicity of its proof and some clever applications of it and I had been interested in finding out more of such. Please contribute examples. One example is the Weierstrass theorem that if a sequence of holomorphic functions converge absolutely and uniformly on every compact subset in a domain, then the limit is also holomorphic. And there are numerous applications of this latter fact.
So, please come ahead and contribute clever and slick applications of Morera's theorem that will impress people!

REPLY [5 votes]: Not sure if either of these applications qualify as "striking," but here's my two cents:
In Rudin's "Real and Complex Analysis" (Third Edition), Morera's Theorem assists in the proofs of the following two interesting theorems.  (Here, I'm paraphrasing, not quoting.)

Müntz-Szász Theorem: Let $0 < \lambda_1 < \lambda_2 < \cdots$, and let $X = \{1, x^{\lambda_1}, x^{\lambda_2}, \ldots\} \subset C[0,1].$  Then $X$ is dense in $C[0,1]$ if and only if $\sum \frac{1}{\lambda_n} = \infty$.

In proving the reverse implication $(\Leftarrow)$, Rudin invokes Morera's Theorem to show that the function $$f(z) = \int_0^1 t^z\,d\mu(t)$$
is holomorphic in the right half-plane, where $\mu$ is a complex Borel measure concentrated on $(0,1]$.

Theorem 16.8: Let $\Omega \subset \mathbb{C}$ be a region, $L$ a line or circular arc, and suppose $\Omega - L = \Omega_1 \cup \Omega_2$ is the union of two regions.  If $f\colon \Omega \to \mathbb{C}$ is continuous in $\Omega$, and is holomorphic in both $\Omega_1$ and $\Omega_2$, then $f$ is holomorphic on $\Omega$.

Morera's Theorem is used (of course) to show that $f$ is holomorphic.