I am trying to construct a sequence $\{f_n\} \in L^2([0,1])$ with $f_n \geq 0$ a.e. such that $f_n \to 0$ weakly in $L^2$ (meaning $\int f_n dx \to 0$ for all $f \in L^2([0,1]))$ and such that for all $g$ in $C([0,1])$, i.e. $g$ continuous, $$ \int |f_n|^2 g dx \to \int g dx. $$ My instinct was that such thing is possible but the more I look at it, the more I find obstacles. Such a sequence must be quite delicate in that if we strengthen the conclusion to $\int |f_n|^2 g dx \to \int g dx$ for all $g \in L^\infty$ then the claim is immediately false as Egorov's theorem gives that (as $f_n \to 0$ in measure implies $f_n^2 \to 0$ in measure and convergence in measure implies convergence a.e. along a subsequence) there exist sets $B$ of close arbitrarily close to full measure along which $\int f_n 1_B dx \to 0$.
So I suppose my question is: does such a sequence of functions exist? If so, can it be defined explicitly? (And if such a sequence cannot exist, I'd welcome a proof to that effect)
Edit: I intended to require that the functions are real-valued and $f_n \geq 0$ so in particular weak convergence does imply convergence to zero in measure.
Edit 2: I don't "get" MO apparently seeing as I've spent 20 mins trying to work out how to thank @AleksieHulikov for his answers and it seems I don't have the "reputation" needed to comment nor to accept his answer. Kids these days, sigh.
Anyway: I would like to thank Aleksie. For the record this was very much not FA homework (though it might make a good hw problem for those of you teaching that), it was simply that I haven't thought hard about analysis in decades (since grad school to be precise) and when I ran into this, some of my younger colleagues who I asked suggested I come here.