JVM add tests for KT-49615
This commit is contained in:
committed by
teamcityserver
parent
7e633cf217
commit
8b066fd345
+12
@@ -7864,6 +7864,18 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/constructorCall/inlineFunInLocalClassConstructorCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt49615.kt")
|
||||
public void testKt49615() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/constructorCall/kt49615.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt49615a.kt")
|
||||
public void testKt49615a() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/constructorCall/kt49615a.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("loopInInlineFun.kt")
|
||||
public void testLoopInInlineFun() throws Exception {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun builder(c: suspend () -> Unit): Int = 42
|
||||
|
||||
@JvmInline
|
||||
value class IC(val s: String)
|
||||
|
||||
fun box(): String {
|
||||
builder {
|
||||
listOf(
|
||||
IC("O".plus("").sumOf { a: Char -> 1.toULong() }.rangeTo(67.toULong()).first.toString(36)),
|
||||
IC("")
|
||||
)
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
|
||||
@JvmInline
|
||||
value class IC(val s: String)
|
||||
|
||||
fun asAny(a: Any) = a
|
||||
|
||||
fun box(): String {
|
||||
val t = asAny(
|
||||
IC("O".plus("").sumOf { a: Char -> 1.toULong() }.rangeTo(67.toULong()).first.toString(36))
|
||||
).toString()
|
||||
if (t != "IC(s=1)")
|
||||
return "Failed: t=$t"
|
||||
return "OK"
|
||||
}
|
||||
+12
@@ -7786,6 +7786,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/constructorCall/inlineFunInLocalClassConstructorCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt49615.kt")
|
||||
public void testKt49615() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/constructorCall/kt49615.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt49615a.kt")
|
||||
public void testKt49615a() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/constructorCall/kt49615a.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("loopInInlineFun.kt")
|
||||
public void testLoopInInlineFun() throws Exception {
|
||||
|
||||
+12
@@ -7864,6 +7864,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/constructorCall/inlineFunInLocalClassConstructorCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt49615.kt")
|
||||
public void testKt49615() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/constructorCall/kt49615.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt49615a.kt")
|
||||
public void testKt49615a() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/constructorCall/kt49615a.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("loopInInlineFun.kt")
|
||||
public void testLoopInInlineFun() throws Exception {
|
||||
|
||||
+10
@@ -5950,6 +5950,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/constructorCall/inlineFunInLocalClassConstructorCall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt49615.kt")
|
||||
public void testKt49615() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/constructorCall/kt49615.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt49615a.kt")
|
||||
public void testKt49615a() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/constructorCall/kt49615a.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("loopInInlineFun.kt")
|
||||
public void testLoopInInlineFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/constructorCall/loopInInlineFun.kt");
|
||||
|
||||
Reference in New Issue
Block a user