Skip to content

Commit 82afe5f

Browse files
committed
Fix #840
Problem was that interceptTypeTestCasts was run at wrong phase. It saw after erasura a type of the form `x.Array$$T`. Before erasure that type is simply an alias of another type, but after erasure, Arraya$$T is defined to be a type alias of a Wildcard type.
1 parent b927f66 commit 82afe5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ object Erasure extends TypeTestsCasts{
400400
}
401401

402402
override def typedTypeApply(tree: untpd.TypeApply, pt: Type)(implicit ctx: Context) = {
403-
val ntree = interceptTypeApply(tree.asInstanceOf[TypeApply])
403+
val ntree = interceptTypeApply(tree.asInstanceOf[TypeApply])(ctx.withPhase(ctx.erasurePhase))
404404

405405
ntree match {
406406
case TypeApply(fun, args) =>

0 commit comments

Comments
 (0)