KT-16535 'provideDelegate' convention is not supported in IR

Implement provideDelegate convention support.
NB delegate type now depends on 'provideDelegate' convention resolution.
This commit is contained in:
Dmitry Petrov
2017-02-28 12:07:34 +03:00
parent 6046b25f56
commit 885f397cdd
14 changed files with 544 additions and 28 deletions
@@ -268,6 +268,51 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/typeAlias.kt");
doTest(fileName);
}
@TestMetadata("compiler/testData/ir/irText/declarations/provideDelegate")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ProvideDelegate extends AbstractIrTextTestCase {
public void testAllFilesPresentInProvideDelegate() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/declarations/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("differentReceivers.kt")
public void testDifferentReceivers() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.kt");
doTest(fileName);
}
@TestMetadata("local.kt")
public void testLocal() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/provideDelegate/local.kt");
doTest(fileName);
}
@TestMetadata("localDifferentReceivers.kt")
public void testLocalDifferentReceivers() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.kt");
doTest(fileName);
}
@TestMetadata("member.kt")
public void testMember() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/provideDelegate/member.kt");
doTest(fileName);
}
@TestMetadata("memberExtension.kt")
public void testMemberExtension() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.kt");
doTest(fileName);
}
@TestMetadata("topLevel.kt")
public void testTopLevel() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/provideDelegate/topLevel.kt");
doTest(fileName);
}
}
}
@TestMetadata("compiler/testData/ir/irText/errors")