From 10a061d425857c9e7bf4fa9aba9923b90467e24e Mon Sep 17 00:00:00 2001 From: James Iry Date: Mon, 22 Jul 2013 17:45:36 -0700 Subject: Adds a setting to delay delambdafication. If set then uncurry lifts the body of a lambda into a local def. Tests are included to show the different tree shapes. --- .../run/delambdafy_uncurry_byname_inline.check | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/files/run/delambdafy_uncurry_byname_inline.check (limited to 'test/files/run/delambdafy_uncurry_byname_inline.check') diff --git a/test/files/run/delambdafy_uncurry_byname_inline.check b/test/files/run/delambdafy_uncurry_byname_inline.check new file mode 100644 index 0000000000..0dc69b379a --- /dev/null +++ b/test/files/run/delambdafy_uncurry_byname_inline.check @@ -0,0 +1,21 @@ +[[syntax trees at end of uncurry]] // newSource1.scala +package { + class Foo extends Object { + def (): Foo = { + Foo.super.(); + () + }; + def bar(x: () => Int): Int = x.apply(); + def foo(): Int = Foo.this.bar({ + @SerialVersionUID(0) final class $anonfun extends scala.runtime.AbstractFunction0[Int] with Serializable { + def (): <$anon: () => Int> = { + $anonfun.super.(); + () + }; + final def apply(): Int = 1 + }; + (new <$anon: () => Int>(): () => Int) + }) + } +} + -- cgit v1.2.3