Skip to content

Commit c16fe10

Browse files
committed
Relax erased type check
Now that mixin forwarders are generated after erasure, we may end up with a reference to ThisType(*:) after erasure in Tuple.scala, because *: extends NonEmptyTuple which erases to Product, and Product has methods that should get mixin forwarders. This fixes the tastyBootstrap test broken after the last commit.
1 parent 3138447 commit c16fe10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/Erasure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class Erasure extends Phase with DenotTransformer {
135135

136136
def assertErased(tp: Type, tree: tpd.Tree = tpd.EmptyTree)(implicit ctx: Context): Unit = {
137137
def isAllowed(cls: Symbol, sourceName: String) =
138-
tp.typeSymbol == cls && ctx.compilationUnit.source.file.name == sourceName
138+
tp.widen.typeSymbol == cls && ctx.compilationUnit.source.file.name == sourceName
139139
assert(isErasedType(tp) ||
140140
isAllowed(defn.ArrayClass, "Array.scala") ||
141141
isAllowed(defn.TupleClass, "Tuple.scala") ||

0 commit comments

Comments
 (0)