K2 JS/Native: reproduce KT-57986

This commit is contained in:
Mikhail Glukhikh
2023-04-15 13:00:55 +02:00
committed by Space Team
parent beaeb405d2
commit c826c7301c
16 changed files with 108 additions and 0 deletions
@@ -18541,6 +18541,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/fir/SuspendFunctionReference.kt");
}
@Test
@TestMetadata("toLong.kt")
public void testToLong() throws Exception {
runTest("compiler/testData/codegen/box/fir/toLong.kt");
}
@Test
@TestMetadata("unqualifiedEnum.kt")
public void testUnqualifiedEnum() throws Exception {
@@ -18541,6 +18541,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/fir/SuspendFunctionReference.kt");
}
@Test
@TestMetadata("toLong.kt")
public void testToLong() throws Exception {
runTest("compiler/testData/codegen/box/fir/toLong.kt");
}
@Test
@TestMetadata("unqualifiedEnum.kt")
public void testUnqualifiedEnum() throws Exception {
+20
View File
@@ -0,0 +1,20 @@
// ISSUE: KT-57986
// IGNORE_BACKEND_K2: JS_IR, NATIVE
// MODULE: m1
// FILE: m1.kt
fun foo() = 42
val x = foo()
val y = x.toLong()
// MODULE: m2(m1)
// FILE: m2.kt
fun box(): String {
if (y == 42L) {
return "OK"
}
return y.toString()
}
@@ -17664,6 +17664,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
public void testSuspendFunctionReference() throws Exception {
runTest("compiler/testData/codegen/box/fir/SuspendFunctionReference.kt");
}
@Test
@TestMetadata("toLong.kt")
public void testToLong() throws Exception {
runTest("compiler/testData/codegen/box/fir/toLong.kt");
}
}
@Nested
@@ -18541,6 +18541,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/fir/SuspendFunctionReference.kt");
}
@Test
@TestMetadata("toLong.kt")
public void testToLong() throws Exception {
runTest("compiler/testData/codegen/box/fir/toLong.kt");
}
@Test
@TestMetadata("unqualifiedEnum.kt")
public void testUnqualifiedEnum() throws Exception {
@@ -18541,6 +18541,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
runTest("compiler/testData/codegen/box/fir/SuspendFunctionReference.kt");
}
@Test
@TestMetadata("toLong.kt")
public void testToLong() throws Exception {
runTest("compiler/testData/codegen/box/fir/toLong.kt");
}
@Test
@TestMetadata("unqualifiedEnum.kt")
public void testUnqualifiedEnum() throws Exception {
@@ -14632,6 +14632,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
public void testSuspendFunctionReference() throws Exception {
runTest("compiler/testData/codegen/box/fir/SuspendFunctionReference.kt");
}
@TestMetadata("toLong.kt")
public void testToLong() throws Exception {
runTest("compiler/testData/codegen/box/fir/toLong.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/fullJdk")