K2: reproduce KT-60312

This commit is contained in:
Mikhail Glukhikh
2023-11-10 16:11:01 +01:00
committed by Space Team
parent 53ab32e0fb
commit 4abce54748
15 changed files with 116 additions and 0 deletions
@@ -2778,6 +2778,12 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI
runTest("compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt");
}
@Test
@TestMetadata("IntArrayAsVararg.kt")
public void testIntArrayAsVararg() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/IntArrayAsVararg.kt");
}
@Test
@TestMetadata("integerLiteralWithExpectedTypealiasType.kt")
public void testIntegerLiteralWithExpectedTypealiasType() throws Exception {
@@ -2778,6 +2778,12 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest {
runTest("compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt");
}
@Test
@TestMetadata("IntArrayAsVararg.kt")
public void testIntArrayAsVararg() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/IntArrayAsVararg.kt");
}
@Test
@TestMetadata("integerLiteralWithExpectedTypealiasType.kt")
public void testIntegerLiteralWithExpectedTypealiasType() throws Exception {
@@ -0,0 +1,16 @@
FILE fqName:<root> fileName:/IntArrayAsVararg.kt
FUN name:main visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun consumeVarargs (vararg arr: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
arr: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
CONST Int type=kotlin.Int value=1
CONST Int type=kotlin.Int value=2
CALL 'public final fun consumeVarargs (vararg arr: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
arr: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
CALL 'public final fun intArrayOf (vararg elements: kotlin.Int): kotlin.IntArray declared in kotlin' type=kotlin.IntArray origin=null
elements: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
CONST Int type=kotlin.Int value=41
CONST Int type=kotlin.Int value=42
FUN name:consumeVarargs visibility:public modality:FINAL <> (arr:kotlin.IntArray) returnType:kotlin.Unit
VALUE_PARAMETER name:arr index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
@@ -0,0 +1,7 @@
fun main() {
consumeVarargs(arr = [1, 2])
consumeVarargs(arr = [intArrayOf(elements = [41, 42])])
}
fun consumeVarargs(vararg arr: Int) {
}
@@ -0,0 +1,17 @@
FILE fqName:<root> fileName:/IntArrayAsVararg.kt
FUN name:main visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun consumeVarargs (vararg arr: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
arr: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
CONST Int type=kotlin.Int value=1
CONST Int type=kotlin.Int value=2
CALL 'public final fun consumeVarargs (vararg arr: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
arr: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
SPREAD_ELEMENT
CALL 'public final fun intArrayOf (vararg elements: kotlin.Int): kotlin.IntArray declared in kotlin' type=kotlin.IntArray origin=null
elements: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
CONST Int type=kotlin.Int value=41
CONST Int type=kotlin.Int value=42
FUN name:consumeVarargs visibility:public modality:FINAL <> (arr:kotlin.IntArray) returnType:kotlin.Unit
VALUE_PARAMETER name:arr index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
@@ -0,0 +1,10 @@
// WITH_STDLIB
// ISSUE: KT-60312
// SKIP_SIGNATURE_DUMP
fun main() {
consumeVarargs(1, 2)
consumeVarargs(arr = intArrayOf(41, 42))
}
fun consumeVarargs(vararg arr: Int) {}
@@ -0,0 +1,7 @@
fun main() {
consumeVarargs(arr = [1, 2])
consumeVarargs(arr = [*intArrayOf(elements = [41, 42])])
}
fun consumeVarargs(vararg arr: Int) {
}
@@ -2778,6 +2778,12 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest
runTest("compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt");
}
@Test
@TestMetadata("IntArrayAsVararg.kt")
public void testIntArrayAsVararg() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/IntArrayAsVararg.kt");
}
@Test
@TestMetadata("integerLiteralWithExpectedTypealiasType.kt")
public void testIntegerLiteralWithExpectedTypealiasType() throws Exception {
@@ -2088,6 +2088,11 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase {
runTest("compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt");
}
@TestMetadata("IntArrayAsVararg.kt")
public void testIntArrayAsVararg() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/IntArrayAsVararg.kt");
}
@TestMetadata("integerLiteralWithExpectedTypealiasType.kt")
public void testIntegerLiteralWithExpectedTypealiasType() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/integerLiteralWithExpectedTypealiasType.kt");
@@ -2394,6 +2394,12 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeJsIrT
runTest("compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt");
}
@Test
@TestMetadata("IntArrayAsVararg.kt")
public void testIntArrayAsVararg() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/IntArrayAsVararg.kt");
}
@Test
@TestMetadata("integerLiteralWithExpectedTypealiasType.kt")
public void testIntegerLiteralWithExpectedTypealiasType() throws Exception {
@@ -2394,6 +2394,12 @@ public class FirPsiJsIrTextTestGenerated extends AbstractFirPsiJsIrTextTest {
runTest("compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt");
}
@Test
@TestMetadata("IntArrayAsVararg.kt")
public void testIntArrayAsVararg() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/IntArrayAsVararg.kt");
}
@Test
@TestMetadata("integerLiteralWithExpectedTypealiasType.kt")
public void testIntegerLiteralWithExpectedTypealiasType() throws Exception {
@@ -2394,6 +2394,12 @@ public class ClassicJsIrTextTestGenerated extends AbstractClassicJsIrTextTest {
runTest("compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt");
}
@Test
@TestMetadata("IntArrayAsVararg.kt")
public void testIntArrayAsVararg() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/IntArrayAsVararg.kt");
}
@Test
@TestMetadata("integerLiteralWithExpectedTypealiasType.kt")
public void testIntegerLiteralWithExpectedTypealiasType() throws Exception {
@@ -2400,6 +2400,12 @@ public class ClassicNativeIrTextTestGenerated extends AbstractClassicNativeIrTex
runTest("compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt");
}
@Test
@TestMetadata("IntArrayAsVararg.kt")
public void testIntArrayAsVararg() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/IntArrayAsVararg.kt");
}
@Test
@TestMetadata("integerLiteralWithExpectedTypealiasType.kt")
public void testIntegerLiteralWithExpectedTypealiasType() throws Exception {
@@ -2400,6 +2400,12 @@ public class FirLightTreeNativeIrTextTestGenerated extends AbstractFirLightTreeN
runTest("compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt");
}
@Test
@TestMetadata("IntArrayAsVararg.kt")
public void testIntArrayAsVararg() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/IntArrayAsVararg.kt");
}
@Test
@TestMetadata("integerLiteralWithExpectedTypealiasType.kt")
public void testIntegerLiteralWithExpectedTypealiasType() throws Exception {
@@ -2400,6 +2400,12 @@ public class FirPsiNativeIrTextTestGenerated extends AbstractFirPsiNativeIrTextT
runTest("compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt");
}
@Test
@TestMetadata("IntArrayAsVararg.kt")
public void testIntArrayAsVararg() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/IntArrayAsVararg.kt");
}
@Test
@TestMetadata("integerLiteralWithExpectedTypealiasType.kt")
public void testIntegerLiteralWithExpectedTypealiasType() throws Exception {