Skip to content

Commit 2517d2d

Browse files
committed
Make isProvisional avoid cyclic references
isProvisional should never force things, if it needs to complete a denotation, it should instead return false instead.
1 parent 1b37350 commit 2517d2d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,10 @@ object Types {
117117
case t: TypeRef =>
118118
!t.currentSymbol.isStatic && {
119119
(t: Type).mightBeProvisional = false // break cycles
120-
t.symbol.is(Provisional)
120+
t.symbol.flagsUNSAFE.is(Provisional)
121121
|| test(t.prefix, theAcc)
122-
|| t.info.match
122+
|| t.denot.infoOrCompleter.match
123+
case info: LazyType => true
123124
case info: AliasingBounds => test(info.alias, theAcc)
124125
case TypeBounds(lo, hi) => test(lo, theAcc) || test(hi, theAcc)
125126
case _ => false

0 commit comments

Comments
 (0)