JVM IR: use correct owner for callable references in optimized multifile classes

The owner should always be the facade class, because the part class is
package-private and will be inaccessible from other package.

Note that in the old backend, function references already do have the
facade as the owner correctly, but property references don't, this is
reported as KT-37972.
This commit is contained in:
Alexander Udalov
2020-04-02 22:18:06 +02:00
parent 78467792d5
commit bb1a12e28e
7 changed files with 140 additions and 11 deletions
@@ -17634,6 +17634,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToPrivateConstVal.kt");
}
@TestMetadata("callableReferencesToSameFunctionsFromDifferentPackages.kt")
public void testCallableReferencesToSameFunctionsFromDifferentPackages() throws Exception {
runTest("compiler/testData/codegen/box/multifileClasses/optimized/callableReferencesToSameFunctionsFromDifferentPackages.kt");
}
@TestMetadata("callableReferencesToSamePropertiesFromDifferentPackages.kt")
public void testCallableReferencesToSamePropertiesFromDifferentPackages() throws Exception {
runTest("compiler/testData/codegen/box/multifileClasses/optimized/callableReferencesToSamePropertiesFromDifferentPackages.kt");
}
@TestMetadata("calls.kt")
public void testCalls() throws Exception {
runTest("compiler/testData/codegen/box/multifileClasses/optimized/calls.kt");