How does Weierstrass' theorem follow from Mergelyan's theorem?

According to Theorems 1 and 3 in this review article we have

Weierstrass: Suppose $$f$$ is a continuous function on a closed bounded interval $$[a,b] \subset\mathbb{R}$$. For every $$\epsilon > 0$$ there exists a polynomial $$p$$ such that for all $$x \in [a,b]$$ we have $$| f(x)− p(x)| < \epsilon$$.

Mergelyan: If $$K$$ is a compact set in $$C$$ with connected complement, then every continuous function $$f\colon K\to \mathbb{C}$$ that is holomorphic in the interior of $$K$$ can be approximated uniformly on $$K$$ by holomorphic polynomials.

Both Wikipedia and the review say that the latter is a generalization of the former. In which sense is this true? How does Weierstrass' theorem follow from Mergelyan's?

The hypotheses of Weierstrass satisfy the hypotheses of Mergelyan:

$$K=[a,b] \subseteq \mathbb C$$ is a compact set with connected complement.

Since $$K$$ has empty interior, "holomorphic in the interior of $$K$$" is true.

The conclusions of Mergelyan imply the conclusions of Weierstrass:

"approximated uniformly" is the same as "$$| f(x)− p(x)| < \epsilon$$ for all $$x \in K$$".

• The issue is that those approximation polynomials are complex. To complete the argument, you might consider their real part. Oct 5 '18 at 12:57
• @mathcounterexamples.net, ah, I see, that's an important point, thanks.
– lhf
Oct 5 '18 at 12:58
• Oh how embarassing. I somehow thought the interior of $K$ needed to be nonempty and thought that somehow the function from the Weierstrass theorem would need to be thought of as a function on a part of the boundary of a unit disk etc. Oct 5 '18 at 13:24