File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -526,11 +526,17 @@ object SymDenotations {
526
526
final def isRealizable (implicit ctx : Context ) =
527
527
is(Stable ) || isType || {
528
528
val isRealizable =
529
- ! is( Lazy , butNot = Module ) ||
529
+ ! isLateInitialized ||
530
530
isEffectivelyFinal && ctx.realizability(info) == TypeOps .Realizable
531
531
isRealizable && { setFlag(Stable ); true }
532
532
}
533
533
534
+ /** Field is initialized on use, not on definition;
535
+ * we do not count modules as fields here.
536
+ */
537
+ final def isLateInitialized (implicit ctx : Context ) =
538
+ is(Lazy , butNot = Module ) || is(Param ) && info.isInstanceOf [ExprType ]
539
+
534
540
/** Is this a "real" method? A real method is a method which is:
535
541
* - not an accessor
536
542
* - not a label
You can’t perform that action at this time.
0 commit comments