JS: add test to prove that KT-11910 is not reproducible anymore
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
// IGNORE_BACKEND: JVM
|
||||
|
||||
class A(val x: String) {
|
||||
open inner class AB(val y: String) {
|
||||
fun bar() = x + y
|
||||
}
|
||||
}
|
||||
|
||||
fun A.foo(u: String, v: String, w: String): A.AB {
|
||||
class FooC(z: String) : A.AB("$z$v$w")
|
||||
return FooC(u)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val r = A("1").foo("2", "3", "4").bar()
|
||||
if (r != "1234") return "fail: $r"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+12
@@ -11252,6 +11252,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("subclassingExtensionReceiverClass.kt")
|
||||
public void testSubclassingExtensionReceiverClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/subclassingExtensionReceiverClass.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("withclosure.kt")
|
||||
public void testWithclosure() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/withclosure.kt");
|
||||
|
||||
@@ -11252,6 +11252,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("subclassingExtensionReceiverClass.kt")
|
||||
public void testSubclassingExtensionReceiverClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/subclassingExtensionReceiverClass.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("withclosure.kt")
|
||||
public void testWithclosure() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/withclosure.kt");
|
||||
|
||||
@@ -11104,6 +11104,18 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("subclassingExtensionReceiverClass.kt")
|
||||
public void ignoreSubclassingExtensionReceiverClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/subclassingExtensionReceiverClass.kt");
|
||||
try {
|
||||
doTest(fileName);
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInLocalClasses() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/localClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@@ -12470,6 +12470,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("subclassingExtensionReceiverClass.kt")
|
||||
public void testSubclassingExtensionReceiverClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/subclassingExtensionReceiverClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("withclosure.kt")
|
||||
public void testWithclosure() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/withclosure.kt");
|
||||
|
||||
Reference in New Issue
Block a user