diff options
author | Martin Odersky <odersky@gmail.com> | 2015-12-21 11:59:56 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-12-21 11:59:56 +0100 |
commit | c3be5073490be226fe2010c2ab445998257cf422 (patch) | |
tree | 50f93ec70a8372849eec3a884db1adef86a71667 /src | |
parent | f75f2adc7288d19eaf18b3197d691de45c404159 (diff) | |
download | dotty-c3be5073490be226fe2010c2ab445998257cf422.tar.gz dotty-c3be5073490be226fe2010c2ab445998257cf422.tar.bz2 dotty-c3be5073490be226fe2010c2ab445998257cf422.zip |
Refine interdiction of Array after erasure
Array is still allowed after erasure when compiling Array.scala.
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/transform/Erasure.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/transform/Erasure.scala b/src/dotty/tools/dotc/transform/Erasure.scala index b3979c524..3445b4c44 100644 --- a/src/dotty/tools/dotc/transform/Erasure.scala +++ b/src/dotty/tools/dotc/transform/Erasure.scala @@ -109,7 +109,11 @@ class Erasure extends Phase with DenotTransformer { thisTransformer => } def assertErased(tp: Type, tree: tpd.Tree = tpd.EmptyTree)(implicit ctx: Context): Unit = - assert(isErasedType(tp), 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}") + if (tp.typeSymbol == defn.ArrayClass && + ctx.compilationUnit.source.file.name == "Array.scala") {} // ok + else + assert(isErasedType(tp), + 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}") } object Erasure extends TypeTestsCasts{ |