We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4908534 + 4b90cf3 commit 59de925Copy full SHA for 59de925
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -140,6 +140,9 @@ object Types extends TypeUtils {
140
!t.isPermanentlyInstantiated || test(t.permanentInst, theAcc)
141
case t: LazyRef =>
142
!t.completed || test(t.ref, theAcc)
143
+ case t: ParamRef =>
144
+ (t: Type).mightBeProvisional = false // break cycles
145
+ test(t.underlying, theAcc)
146
case _ =>
147
(if theAcc != null then theAcc else ProAcc()).foldOver(false, t)
148
end if
tests/pos/dep-poly-class.scala
@@ -0,0 +1,9 @@
1
+trait A:
2
+ type B
3
+
4
+class CCPoly[T <: A](a: T, b: a.B)
5
6
+object Test:
7
+ def test(): Unit =
8
+ val aa: A { type B = Int } = new A { type B = Int }
9
+ val x: CCPoly[aa.type] = CCPoly(aa, 1)
0 commit comments