Introduce KProperty{1,2}.getExtensionDelegate

These two functions are supposed to fix an inconvenience in the design of
KProperty{1,2}.getDelegate for extension properties, where you have to pass an
instance of the extension receiver which is going to be completely ignored

 #KT-8384 Fixed
This commit is contained in:
Alexander Udalov
2017-01-18 18:15:24 +03:00
parent 78f2515e95
commit ebd577e52a
9 changed files with 154 additions and 0 deletions
@@ -18448,6 +18448,18 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
@TestMetadata("getExtensionDelegate.kt")
public void testGetExtensionDelegate() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/getExtensionDelegate.kt");
try {
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
@TestMetadata("kPropertyForDelegatedProperty.kt")
public void testKPropertyForDelegatedProperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/kPropertyForDelegatedProperty.kt");