[IR] Use erased types in backing field initializer in case of generic delegated property

- Since neither IrProperty nor IrField is Type Parameter container
 using of proprty's type parameter in IrField related code leads to
 creation of "hanging" type parameters which should be considered as
 incorrect IR.
 - Such code designed to be prohibited in LV 1.5
 - The fix makes use of erased type in such case
 where type parameter is expected.
This commit is contained in:
Roman Artemev
2020-03-12 15:31:44 +03:00
committed by romanart
parent 13a73b67de
commit d27954a6d4
17 changed files with 919 additions and 33 deletions
@@ -14893,6 +14893,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/serializationRegressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("deepGenericDelegatedProperty.kt")
public void testDeepGenericDelegatedProperty() throws Exception {
runTest("compiler/testData/codegen/box/ir/serializationRegressions/deepGenericDelegatedProperty.kt");
}
@TestMetadata("dispatchReceiverValue.kt")
public void testDispatchReceiverValue() throws Exception {
runTest("compiler/testData/codegen/box/ir/serializationRegressions/dispatchReceiverValue.kt");