Skip to content

Commit 1a215ba

Browse files
committed
Fix tasty bootstrap problem
1 parent 192eee5 commit 1a215ba

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,14 @@ class Erasure extends Phase with DenotTransformer {
190190
def assertErased(tp: Type, tree: tpd.Tree = tpd.EmptyTree)(using Context): Unit = {
191191
def isAllowed(cls: Symbol, sourceName: String) =
192192
tp.typeSymbol == cls && ctx.compilationUnit.source.file.name == sourceName
193-
assert(isErasedType(tp) ||
194-
isAllowed(defn.ArrayClass, "Array.scala") ||
195-
isAllowed(defn.TupleClass, "Tuple.scala") ||
196-
isAllowed(defn.NonEmptyTupleClass, "Tuple.scala") ||
197-
isAllowed(defn.PairClass, "Tuple.scala"),
198-
i"The type $tp - ${tp.toString} of class ${tp.getClass} of tree $tree : ${tree.tpe} / ${tree.getClass} is illegal after erasure, phase = ${ctx.phase.prev}")
193+
assert(
194+
isErasedType(tp)
195+
|| isAllowed(defn.ArrayClass, "Array.scala")
196+
|| isAllowed(defn.TupleClass, "Tuple.scala")
197+
|| isAllowed(defn.NonEmptyTupleClass, "Tuple.scala")
198+
|| isAllowed(defn.PairClass, "Tuple.scala")
199+
|| isAllowed(defn.PureClass, "Pure.scala"),
200+
i"The type $tp - ${tp.toString} of class ${tp.getClass} of tree $tree : ${tree.tpe} / ${tree.getClass} is illegal after erasure, phase = ${ctx.phase.prev}")
199201
}
200202
}
201203

0 commit comments

Comments
 (0)