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
--Warning: initcheck.scala:5:23----------------------------------5|val$values=Array(A)
|^|Promoting the value under initialization to fully-initialized. Callingtrace:
|->val$values=Array(A) [ initcheck.scala:5 ]
1 warning found
when it could look inside to prove it is safe.
One example that is not safe and will lead to NPE in initialisation of object E:
produces warning with
-Ycheck-init
when it could look inside to prove it is safe.
One example that is not safe and will lead to NPE in initialisation of object
E
:as pointed out in #9665 (comment)
if
ref
is made lazy then there is no warning onArray(A)
and objectE
can be constructed correctly.The text was updated successfully, but these errors were encountered: