You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolve#16806
In the repro, `Evaluating` was generated as a subtype of `Serializable`,
and the type of lazy value was erased to `Serializable` - these together
broke the optimized condition checking if the value is initialized. For
lazy val of type `A` we were checking if `LazyValControlState <: A`, and
if that was not the case, we assumed it would be safe to just generate
the condition `_value.isInstanceOf[A]`. If that condition was true in
runtime, we assumed that the value was already calculated and returned
it. If it was `Evaluating` and `A =:= Serializable`, then we assumed so
falsely. The easiest fix is to just make the `LazyValControlState <:
Serializable`, I will check if it doesn't affect performance.
0 commit comments