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")
@@ -13604,6 +13604,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
public void testNestedClassTypeParameterDeserialization() throws Exception {
runTest("compiler/testData/codegen/box/fir/nestedClassTypeParameterDeserialization.kt");
}
@Test
@TestMetadata("toLong.kt")
public void testToLong() throws Exception {
runTest("compiler/testData/codegen/box/fir/toLong.kt");
}
}
@Nested
@@ -13700,6 +13700,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
public void testNestedClassTypeParameterDeserialization() throws Exception {
runTest("compiler/testData/codegen/box/fir/nestedClassTypeParameterDeserialization.kt");
}
@Test
@TestMetadata("toLong.kt")
public void testToLong() throws Exception {
runTest("compiler/testData/codegen/box/fir/toLong.kt");
}
}
@Nested
@@ -13700,6 +13700,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
public void testNestedClassTypeParameterDeserialization() throws Exception {
runTest("compiler/testData/codegen/box/fir/nestedClassTypeParameterDeserialization.kt");
}
@Test
@TestMetadata("toLong.kt")
public void testToLong() throws Exception {
runTest("compiler/testData/codegen/box/fir/toLong.kt");
}
}
@Nested
@@ -13700,6 +13700,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
public void testNestedClassTypeParameterDeserialization() throws Exception {
runTest("compiler/testData/codegen/box/fir/nestedClassTypeParameterDeserialization.kt");
}
@Test
@TestMetadata("toLong.kt")
public void testToLong() throws Exception {
runTest("compiler/testData/codegen/box/fir/toLong.kt");
}
}
@Nested
@@ -15093,6 +15093,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
public void testNestedClassTypeParameterDeserialization() throws Exception {
runTest("compiler/testData/codegen/box/fir/nestedClassTypeParameterDeserialization.kt");
}
@Test
@TestMetadata("toLong.kt")
public void testToLong() throws Exception {
runTest("compiler/testData/codegen/box/fir/toLong.kt");
}
}
@Nested
@@ -15445,6 +15445,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
public void testNestedClassTypeParameterDeserialization() throws Exception {
runTest("compiler/testData/codegen/box/fir/nestedClassTypeParameterDeserialization.kt");
}
@Test
@TestMetadata("toLong.kt")
public void testToLong() throws Exception {
runTest("compiler/testData/codegen/box/fir/toLong.kt");
}
}
@Nested
@@ -14917,6 +14917,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
public void testNestedClassTypeParameterDeserialization() throws Exception {
runTest("compiler/testData/codegen/box/fir/nestedClassTypeParameterDeserialization.kt");
}
@Test
@TestMetadata("toLong.kt")
public void testToLong() throws Exception {
runTest("compiler/testData/codegen/box/fir/toLong.kt");
}
}
@Nested
@@ -15269,6 +15269,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
public void testNestedClassTypeParameterDeserialization() throws Exception {
runTest("compiler/testData/codegen/box/fir/nestedClassTypeParameterDeserialization.kt");
}
@Test
@TestMetadata("toLong.kt")
public void testToLong() throws Exception {
runTest("compiler/testData/codegen/box/fir/toLong.kt");
}
}
@Nested
@@ -12157,6 +12157,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
public void testNestedClassTypeParameterDeserialization() throws Exception {
runTest("compiler/testData/codegen/box/fir/nestedClassTypeParameterDeserialization.kt");
}
@TestMetadata("toLong.kt")
public void testToLong() throws Exception {
runTest("compiler/testData/codegen/box/fir/toLong.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/fullJdk")