Fix protected call to super method from lambda
Previously JVM back-end had an assumption that if we're calling a method declared in the super class from a lambda via a synthetic accessor, that should be a super call and it must be done with 'invokespecial'. Which is wrong because a method declared in the super class may be open and overridden in the subclass, so 'invokevirtual' should be used. Surprisingly, Java SE verifier allowed both instructions, but on Android only the latter is possible #KT-8899 Fixed #KT-9052 Fixed
This commit is contained in:
+6
@@ -37,6 +37,12 @@ public class BlackBoxMultiFileCodegenTestGenerated extends AbstractBlackBoxCodeg
|
||||
doTestMultiFile(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("accessorForProtectedInvokeVirtual")
|
||||
public void testAccessorForProtectedInvokeVirtual() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/accessorForProtectedInvokeVirtual/");
|
||||
doTestMultiFile(fileName);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBoxMultiFile() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxMultiFile"), Pattern.compile("^([^\\.]+)$"), false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user