File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import SymDenotations.LazyType
99import Decorators ._
1010import util .Stats ._
1111import Names ._
12- import Flags .Module
12+ import Flags .{ Module , Provisional }
1313import dotty .tools .dotc .config .Config
1414
1515object TypeApplications {
@@ -284,7 +284,8 @@ class TypeApplications(val self: Type) extends AnyVal {
284284
285285 /** Dealias type if it can be done without forcing the TypeRef's info */
286286 def safeDealias (using Context ): Type = self match {
287- case self : TypeRef if self.denot.exists && self.symbol.isAliasType =>
287+ case self : TypeRef
288+ if self.denot.exists && self.symbol.isAliasType && ! self.symbol.flagsUNSAFE.is(Provisional ) =>
288289 self.superType.stripTypeVar.safeDealias
289290 case _ =>
290291 self
Original file line number Diff line number Diff line change @@ -2035,10 +2035,10 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
20352035 // If it is an alias type, it would mean the type is cyclic
20362036 // If it is an abstract type, it would mean the type is an irreducible
20372037 // application of a higher-kinded type to a wildcard argument.
2038- // Either way, the wildcard argument is illegal.
2039- // The early test here is needed, so that we do not accidentally reduce
2040- // an application of a Provisional type away so that the type constructor
2041- // is no longer present on the roght hand side. See neg/i15507.scala.
2038+ // Either way, the wildcard argument is illegal. The early test of
2039+ // `checkNoWildcard` here is needed, so that we do not accidentally reduce
2040+ // an application of a Provisional type away, which would mean that the type constructor
2041+ // is no longer present on the right hand side. See neg/i15507.scala.
20422042 checkedArgs = checkedArgs.mapconserve(checkNoWildcard)
20432043 else if tycon == defn.throwsAlias
20442044 && checkedArgs.length == 2
You can’t perform that action at this time.
0 commit comments