Suppose $X\subset \mathbb R^n$ is an irreducible real analytic sub-variety (i.e. the set of solutions of a system $f_1=\ldots=f_k=0$ with $f_i$ analytic)
Let $x\in X$ be a point and let $F: X\to \mathbb R^1$ be a continuous function defined on $X$ in a neighbourhood of $x$. I want to understand whether $F$ is real analytic on $X$. The question is whether the following would be sufficient to know.
Property. Suppose that for any real analytic map $\varphi: (-1,1)\to X$ sending $0$ to $x$ the composition $F\circ \varphi$ is analytic on $(-1,1)$.
Question. Does it follow from the property that $F$ is real analytic in a neighbourhood of $x$?
I am interested both in positive statements in this direction (possibly strengthening the condition of the Property) and in counterexamples.