From a3bf34563d718f19ad02ff9ac5a2a1cec865aa24 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sat, 7 Jul 2012 09:24:50 +0200 Subject: SI-6028 Avoid needless symbol renaming in lambdalift. Preserve names of all referenced free vars. Only the proxy symbols have the fresh names. The resulting natural beauty is evident in the diff of t6028.check. This subsumes the treatment in 0e170e4b that ensured named parameter calls cannot see mangled names; pos/t6028 confirms as much. --- test/files/pos/t6028/t6028_1.scala | 3 +++ test/files/pos/t6028/t6028_2.scala | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 test/files/pos/t6028/t6028_1.scala create mode 100644 test/files/pos/t6028/t6028_2.scala (limited to 'test/files/pos/t6028') diff --git a/test/files/pos/t6028/t6028_1.scala b/test/files/pos/t6028/t6028_1.scala new file mode 100644 index 0000000000..6edb76069e --- /dev/null +++ b/test/files/pos/t6028/t6028_1.scala @@ -0,0 +1,3 @@ +class C { + def foo(a: Int): Unit = () => a +} diff --git a/test/files/pos/t6028/t6028_2.scala b/test/files/pos/t6028/t6028_2.scala new file mode 100644 index 0000000000..f44048c0ab --- /dev/null +++ b/test/files/pos/t6028/t6028_2.scala @@ -0,0 +1,4 @@ +object Test { + // ensure that parameter names are untouched by lambdalift + new C().foo(a = 0) +} -- cgit v1.2.3