Don't use methods from super interface if call was on inline class type

Some methods (like `size` from kotlin.collections.Collection) have
 special rules for mapping and overriding. For example, when we call
 `size`, normally there will be `INVOKEVIRTUAL size()` in the bytecode,
 but for inline classes it should be `INVOKESTATIC ...$Erased.getSize()`
This commit is contained in:
Mikhail Zarechenskiy
2018-06-14 18:18:47 +03:00
parent 246d5e294c
commit c5160a6a95
7 changed files with 47 additions and 1 deletions
@@ -11174,6 +11174,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/inlineClasses/callComputablePropertyInsideInlineClass.kt");
}
@TestMetadata("callSpeciallyOverriddenPropertyOfInlineClass.kt")
public void testCallSpeciallyOverriddenPropertyOfInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/callSpeciallyOverriddenPropertyOfInlineClass.kt");
}
@TestMetadata("callableReferencesWithInlineClasses.kt")
public void testCallableReferencesWithInlineClasses() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/callableReferencesWithInlineClasses.kt");