Use ResolvedCall for callable reference in KCallableNameProperty intrinsic

Instead of manually inspecting the DOUBLE_COLON_LHS slice, which is a
bit more error-prone. Note that new tests were passing before this
change
This commit is contained in:
Alexander Udalov
2017-11-22 18:28:21 +01:00
parent f4f5359725
commit 938fd1a57e
5 changed files with 48 additions and 17 deletions
@@ -96,12 +96,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
doTest(fileName);
}
@TestMetadata("callableReferenceInline.kt")
public void testCallableReferenceInline() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/callableReferenceInline.kt");
doTest(fileName);
}
@TestMetadata("charConstant.kt")
public void testCharConstant() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/charConstant.kt");
@@ -690,6 +684,27 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/callableReference")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class CallableReference extends AbstractBytecodeTextTest {
public void testAllFilesPresentInCallableReference() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("inline.kt")
public void testInline() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/callableReference/inline.kt");
doTest(fileName);
}
@TestMetadata("nameIntrinsicWithImplicitThis.kt")
public void testNameIntrinsicWithImplicitThis() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/callableReference/nameIntrinsicWithImplicitThis.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/capturedVarsOptimization")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)