diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-07-07 09:24:50 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-07-14 17:46:45 +0200 |
commit | a3bf34563d718f19ad02ff9ac5a2a1cec865aa24 (patch) | |
tree | 0725474dd1873e173a60508c420d031c7347d8c2 /test/files/pos/t6028 | |
parent | 32dc7e80698c83947bf4b74f6eadd385a06f5b09 (diff) | |
download | scala-a3bf34563d718f19ad02ff9ac5a2a1cec865aa24.tar.gz scala-a3bf34563d718f19ad02ff9ac5a2a1cec865aa24.tar.bz2 scala-a3bf34563d718f19ad02ff9ac5a2a1cec865aa24.zip |
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.
Diffstat (limited to 'test/files/pos/t6028')
-rw-r--r-- | test/files/pos/t6028/t6028_1.scala | 3 | ||||
-rw-r--r-- | test/files/pos/t6028/t6028_2.scala | 4 |
2 files changed, 7 insertions, 0 deletions
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) +} |