File tree 2 files changed +7
-6
lines changed
compiler/src/dotty/tools/dotc
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import SymDenotations.LazyType
9
9
import Decorators ._
10
10
import util .Stats ._
11
11
import Names ._
12
- import Flags .Module
12
+ import Flags .{ Module , Provisional }
13
13
import dotty .tools .dotc .config .Config
14
14
15
15
object TypeApplications {
@@ -284,7 +284,8 @@ class TypeApplications(val self: Type) extends AnyVal {
284
284
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
- 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 ) =>
288
289
self.superType.stripTypeVar.safeDealias
289
290
case _ =>
290
291
self
Original file line number Diff line number Diff line change @@ -2035,10 +2035,10 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
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
2037
2037
// 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.
2042
2042
checkedArgs = checkedArgs.mapconserve(checkNoWildcard)
2043
2043
else if tycon == defn.throwsAlias
2044
2044
&& checkedArgs.length == 2
You can’t perform that action at this time.
0 commit comments