File tree 1 file changed +6
-2
lines changed
src/dotty/tools/dotc/transform 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -469,7 +469,11 @@ object Erasure extends TypeTestsCasts{
469
469
tpt = untpd.TypedSplice (TypeTree (sym.info).withPos(vdef.tpt.pos))), sym)
470
470
471
471
override def typedDefDef (ddef : untpd.DefDef , sym : Symbol )(implicit ctx : Context ) = {
472
- val restpe = sym.info.resultType
472
+ val restpe =
473
+ if (sym == defn.newRefArrayMethod) defn.ObjectType
474
+ // newRefArray is the only source defined method that's polymorphic
475
+ // after erasure; needs to be treated specially
476
+ else sym.info.resultType
473
477
val ddef1 = untpd.cpy.DefDef (ddef)(
474
478
tparams = Nil ,
475
479
vparamss = (outer.paramDefs(sym) ::: ddef.vparamss.flatten) :: Nil ,
@@ -600,7 +604,7 @@ object Erasure extends TypeTestsCasts{
600
604
601
605
traverse(newStats, oldStats)
602
606
}
603
-
607
+
604
608
private final val NoBridgeFlags = Flags .Accessor | Flags .Deferred | Flags .Lazy
605
609
606
610
/** Create a bridge DefDef which overrides a parent method.
You can’t perform that action at this time.
0 commit comments