File tree 4 files changed +6
-3
lines changed
compiler/src/dotty/tools/dotc
4 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -658,6 +658,9 @@ object SymDenotations {
658
658
containsOpaques ||
659
659
is(Module , butNot = Package ) && owner.seesOpaques
660
660
661
+ def isProvisional (using Context ): Boolean =
662
+ flagsUNSAFE.is(Provisional ) // do not force the info to check the flag
663
+
661
664
/** Is this the denotation of a self symbol of some class?
662
665
* This is the case if one of two conditions holds:
663
666
* 1. It is the symbol referred to in the selfInfo part of the ClassInfo
Original file line number Diff line number Diff line change @@ -285,7 +285,7 @@ class TypeApplications(val self: Type) extends AnyVal {
285
285
/** Dealias type if it can be done without forcing the TypeRef's info */
286
286
def safeDealias (using Context ): Type = self match {
287
287
case self : TypeRef
288
- if self.denot.exists && self.symbol.isAliasType && ! self.symbol.flagsUNSAFE.is( Provisional ) =>
288
+ if self.denot.exists && self.symbol.isAliasType && ! self.symbol.isProvisional =>
289
289
self.superType.stripTypeVar.safeDealias
290
290
case _ =>
291
291
self
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ object Types {
118
118
case t : TypeRef =>
119
119
! t.currentSymbol.isStatic && {
120
120
(t : Type ).mightBeProvisional = false // break cycles
121
- t.symbol.flagsUNSAFE.is( Provisional )
121
+ t.symbol.isProvisional
122
122
|| test(t.prefix, theAcc)
123
123
|| t.denot.infoOrCompleter.match
124
124
case info : LazyType => true
Original file line number Diff line number Diff line change @@ -2030,7 +2030,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
2030
2030
if tycon == defn.andType || tycon == defn.orType then
2031
2031
checkedArgs = checkedArgs.mapconserve(arg =>
2032
2032
checkSimpleKinded(checkNoWildcard(arg)))
2033
- else if tycon.flagsUNSAFE.is( Provisional ) then
2033
+ else if tycon.isProvisional then
2034
2034
// A type with Provisional flag is either an alias or abstract type.
2035
2035
// If it is an alias type, it would mean the type is cyclic
2036
2036
// If it is an abstract type, it would mean the type is an irreducible
You can’t perform that action at this time.
0 commit comments