(Cross posted from Math StackExchange: Does weak $L^2$ approximation implies $L^2$ approximation under a condition similar to convexity?)
Assume $(\Omega, \mu)$ is a probability space. Consider a class of functions $S$ all contained in the unit ball of $L^\infty(\Omega, \mu)$. Let $f \in L^\infty(\Omega, \mu)$ be contained in the weak $L^2$ closure of $S$. Now, if $S$ is convex, Hahn-Banach implies $f$ is also contained in the $L^2$ norm closure of $S$. I’m wondering if the following condition on $S$, which seems similar in spirit to convexity, is also sufficient to imply $f$’s containment in the $L^2$ norm closure of $S$:
For any countable measurable partition $(A_i)$ of $\Omega$ and corresponding collection $(s_i)$ of elements of $S$, the function $\sum_{i \in I} s_i|_{A_i}$ is in $S$. (The sum here is simply a shorthand meaning joining together these functions defined on pairwise disjoint domains.)
Any help or reference is appreciated.
Edit: As pointed out by @NarutakaOZAWA’s comment, this is not true in general. However, I’m mostly interested in the case where $S$ consists of real-valued functions. Does a counterexample also exist in that case?