KT-37448 'this' in delegating constructor call may refer to outer object

This commit is contained in:
Dmitry Petrov
2020-03-12 11:32:57 +03:00
parent 2bd5872782
commit c0b15b1768
13 changed files with 266 additions and 2 deletions
@@ -13750,6 +13750,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt");
}
@TestMetadata("thisRefToObjectInNestedClassConstructorCall.kt")
public void testThisRefToObjectInNestedClassConstructorCall() throws Exception {
runTest("compiler/testData/codegen/box/objects/thisRefToObjectInNestedClassConstructorCall.kt");
}
@TestMetadata("useAnonymousObjectAsIterator.kt")
public void testUseAnonymousObjectAsIterator() throws Exception {
runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt");
@@ -13815,6 +13815,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt");
}
@TestMetadata("thisRefToObjectInNestedClassConstructorCall.kt")
public void testThisRefToObjectInNestedClassConstructorCall() throws Exception {
runTest("compiler/testData/codegen/box/objects/thisRefToObjectInNestedClassConstructorCall.kt");
}
@TestMetadata("useAnonymousObjectAsIterator.kt")
public void testUseAnonymousObjectAsIterator() throws Exception {
runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt");