From 954ea7e2e94b211a0769747a2e03f48609eddb4d Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Fri, 17 Mar 2017 09:52:09 +0100 Subject: SI-10231 Skip outer parameter when classfile parsing java param names Nested java classes have a synthetic outer parameter, which the classfile parser skips for the constructor symbol. When assigning parameter names from the MethodParameters classfile attribute, we also need to skip the first name in this case. --- test/files/run/t10231/A_1.java | 11 +++++++++++ test/files/run/t10231/Test_2.scala | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 test/files/run/t10231/A_1.java create mode 100644 test/files/run/t10231/Test_2.scala (limited to 'test') diff --git a/test/files/run/t10231/A_1.java b/test/files/run/t10231/A_1.java new file mode 100644 index 0000000000..5cc2ed3606 --- /dev/null +++ b/test/files/run/t10231/A_1.java @@ -0,0 +1,11 @@ +/* + * javac: -parameters + */ +public class A_1 { + public class Inner { + public int x; + public Inner(int i) { + x = i; + } + } +} diff --git a/test/files/run/t10231/Test_2.scala b/test/files/run/t10231/Test_2.scala new file mode 100644 index 0000000000..8f8150cab1 --- /dev/null +++ b/test/files/run/t10231/Test_2.scala @@ -0,0 +1,5 @@ +object Test extends App { + val a = new A_1 + val i = new a.Inner(i = 99) + assert(i.x == 99) +} -- cgit v1.2.3