File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
207207 tpd.cpy.Apply (tree)(
208208 tree.fun,
209209 tree.args.map(arg =>
210- if (methType.isImplicitMethod && arg.pos.isSynthetic) defaultValue(arg.tpe )
210+ if (methType.isImplicitMethod && arg.pos.isSynthetic) ref(defn. Predef_undefined )
211211 else dropInlines.transform(arg)))
212212 else
213213 tree
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import Contexts._
66import DenotTransformers .SymTransformer
77import Flags ._
88import SymDenotations ._
9+ import Symbols ._
910import Types ._
1011import typer .RefChecks
1112import MegaPhase .MiniPhase
@@ -36,17 +37,17 @@ class CutErasedDecls extends MiniPhase with SymTransformer { thisTransform =>
3637
3738 override def transformApply (tree : Apply )(implicit ctx : Context ) =
3839 if (tree.fun.tpe.widen.isErasedMethod)
39- cpy.Apply (tree)(tree.fun, tree.args.map(arg => defaultValue(arg.tpe )))
40+ cpy.Apply (tree)(tree.fun, tree.args.map(arg => ref(defn. Predef_undefined )))
4041 else tree
4142
4243 override def transformValDef (tree : ValDef )(implicit ctx : Context ) =
4344 if (tree.symbol.is(Erased ) && ! tree.rhs.isEmpty)
44- cpy.ValDef (tree)(rhs = defaultValue(tree.rhs.tpe ))
45+ cpy.ValDef (tree)(rhs = ref(defn. Predef_undefined ))
4546 else tree
4647
4748 override def transformDefDef (tree : DefDef )(implicit ctx : Context ) =
4849 if (tree.symbol.is(Erased ) && ! tree.rhs.isEmpty)
49- cpy.DefDef (tree)(rhs = defaultValue(tree.rhs.tpe ))
50+ cpy.DefDef (tree)(rhs = ref(defn. Predef_undefined ))
5051 else tree
5152}
5253object CutErasedDecls {
You can’t perform that action at this time.
0 commit comments