aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/Compiler.scala7
-rw-r--r--src/dotty/tools/dotc/transform/ElimByName.scala4
2 files changed, 7 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/Compiler.scala b/src/dotty/tools/dotc/Compiler.scala
index 473560a67..d0d43a541 100644
--- a/src/dotty/tools/dotc/Compiler.scala
+++ b/src/dotty/tools/dotc/Compiler.scala
@@ -19,10 +19,13 @@ class Compiler {
def phases: List[List[Phase]] =
List(
List(new FrontEnd),
- List(new FirstTransform, new SyntheticMethods),
+ List(new FirstTransform,
+ new SyntheticMethods),
List(new SuperAccessors),
// pickling goes here
- List(new RefChecks, new ElimRepeated, new ElimLocals),
+ List(new RefChecks,
+ new ElimRepeated,
+ new ElimLocals),
List(new ExtensionMethods),
List(new TailRec),
List(new PatternMatcher,
diff --git a/src/dotty/tools/dotc/transform/ElimByName.scala b/src/dotty/tools/dotc/transform/ElimByName.scala
index 80edf8819..38225f17f 100644
--- a/src/dotty/tools/dotc/transform/ElimByName.scala
+++ b/src/dotty/tools/dotc/transform/ElimByName.scala
@@ -60,8 +60,8 @@ class ElimByName extends MiniPhaseTransform with InfoTransformer { thisTransform
qual
case _ =>
val meth = ctx.newSymbol(
- ctx.owner, nme.ANON_FUN, Synthetic, MethodType(Nil, Nil, arg.tpe.widen))
- Closure(meth, _ => arg)
+ ctx.owner, nme.ANON_FUN, Synthetic | Method, MethodType(Nil, Nil, arg.tpe.widen))
+ Closure(meth, _ => arg.changeOwner(ctx.owner, meth))
}
case _ =>
arg