Let $X$ be a topological space and $Y$ a metric space. A classical result states that compact-open topology on the space $C(X,Y)$ of continuous functions is the same as the topology of uniform convergence on compact sub-sets.
In general one may define compact-open topology on the whole space $Y^X$ of all functions from $X$ to $Y$.
Is it true that if $f_n\to f$ with respect to the compact-open topology, and all $f_n$ are continuous, then the limit $f$ is continuous?
I never seen any theorem stated that way, and I suspect that it may be false.
If so, is there some condition to put on $X$ so to make the above statement true?