File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -74,11 +74,13 @@ class CheckRealizable(implicit ctx: Context) {
7474 else {
7575 val r =
7676 if (! sym.isStable) NotStable
77- else if (! isLateInitialized(sym)) realizability(tp.prefix)
77+ else if (! isLateInitialized(sym)) Realizable
7878 else if (! sym.isEffectivelyFinal) new NotFinal (sym)
7979 else realizability(tp.info).mapError(r => new ProblemInUnderlying (tp.info, r))
80- if (r == Realizable ) sym.setFlag(Stable )
81- r
80+ r andAlso {
81+ sym.setFlag(Stable )
82+ realizability(tp.prefix)
83+ }
8284 }
8385 case _ : SingletonType | NoPrefix =>
8486 Realizable
Original file line number Diff line number Diff line change 1+ class Hello {
2+ class Foo {
3+ class Bar
4+ final lazy val s : Bar = ???
5+ }
6+
7+ lazy val foo : Foo = ???
8+
9+ val x : foo.s.type = ??? // error: `foo` must be final since it's a lazy val
10+ val x2 : foo.s.type = ??? // error: `foo` must be final since it's a lazy val
11+ }
12+
You can’t perform that action at this time.
0 commit comments