Skip to content

Commit 5133124

Browse files
committed
TypeErasure.isErasedType: scala.Array is invalid after Erasure.
It should either be erased to j.l.Object or replaced by JavaArrayType.
1 parent 473c831 commit 5133124

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/core/TypeErasure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ object TypeErasure {
3939
case _: ErasedValueType =>
4040
true
4141
case tp: TypeRef =>
42-
tp.symbol.isClass && tp.symbol != defn.AnyClass
42+
tp.symbol.isClass && tp.symbol != defn.AnyClass && tp.symbol != defn.ArrayClass
4343
case _: TermRef =>
4444
true
4545
case JavaArrayType(elem) =>

0 commit comments

Comments
 (0)