Why do we need compactness?
As a counterexample: $\Bbb R$ is closed, and $\Bbb Z$ is an infinite subset of $\Bbb R$. However, $\Bbb Z$ has no limit points.
Your conclusion fails because you assumed that $x$, a limit point of $E$, exists.
As a counterexample: $\Bbb R$ is closed, and $\Bbb Z$ is an infinite subset of $\Bbb R$. However, $\Bbb Z$ has no limit points.
Your conclusion fails because you assumed that $x$, a limit point of $E$, exists.