We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 15fccde + b3e006f commit e835668Copy full SHA for e835668
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -3639,6 +3639,9 @@ object Types {
3639
if ann.refersToParamOf(thisLambdaType) then TrueDeps
3640
else compute(status, parent, theAcc)
3641
case _: ThisType | _: BoundType | NoPrefix => status
3642
+ case t: LazyRef =>
3643
+ if t.completed then compute(status, t.ref, theAcc)
3644
+ else Unknown
3645
case _ =>
3646
(if theAcc != null then theAcc else DepAcc()).foldOver(status, tp)
3647
compute(initial, tp, null)
tests/pos/i14771.scala
@@ -0,0 +1,13 @@
1
+trait Layouts:
2
+ type Layout <: {
3
+ def withName(name: String): Layout
4
+ }
5
+ val l: Layout
6
+
7
+val ls = new Layouts:
8
+ class Layout17:
9
+ def withName(name: String): Layout17 = this
10
+ type Layout = Layout17
11
+ val l = Layout17()
12
13
+def test = ls.l
0 commit comments