From 4794374af4d7c84ed6e06ac9c4e4f9f9d09cb102 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Fri, 25 May 2012 08:07:28 +0200 Subject: SI-5652 Mangle names of potentially public lambda lifted methods. This can happen if they are accessed from an inner class. If a subclass is happens to lift a public method to the same name, a VerifyError ensues. The enclosed tests: - demonstrate the absense of the VerifyError - show the names generated for the lifted methods (which are unchanged if not called from an inner class, or if lifted into a trait implementation class.) - ensure that the callers are rewritten to call the correct method when multiple with the same name are lifted. It's not ideal that this phase needs a priori knowledge of the later phases to perform this mangling. A better fix would defer this until the point when the methods are publicised, and leave the unmangled private method in place and install an public, mangled forwarder. --- test/files/run/t5652c.check | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/files/run/t5652c.check (limited to 'test/files/run/t5652c.check') diff --git a/test/files/run/t5652c.check b/test/files/run/t5652c.check new file mode 100644 index 0000000000..3b889e066d --- /dev/null +++ b/test/files/run/t5652c.check @@ -0,0 +1,6 @@ +public final int A1.A1$$g$1() +public final int A1.A1$$g$2() +public int A1.f1() +public int A1.f2() +1 +2 -- cgit v1.2.3