Fix exception on inlining callable reference with implicit this in LHS

Use ResolvedCall to determine the receiver type in the JVM codegen,
instead of manually inspecting the PSI

 #KT-20821 Fixed
This commit is contained in:
Alexander Udalov
2017-11-22 17:40:06 +01:00
parent 1ceb751061
commit f4f5359725
11 changed files with 124 additions and 42 deletions
@@ -745,6 +745,18 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
doTest(fileName);
}
@TestMetadata("emptyLhsFunction.kt")
public void testEmptyLhsFunction() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt");
doTest(fileName);
}
@TestMetadata("emptyLhsProperty.kt")
public void testEmptyLhsProperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsProperty.kt");
doTest(fileName);
}
@TestMetadata("expression.kt")
public void testExpression() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt");