Native: workaround KT-59552 in filecheck_single_tls_load test
After recent changes (0cfb801) println got inlined into the checked
function. As a result, the test became affected by KT-59552.
Fix the test by moving println out of the checked function.
This commit is contained in:
committed by
Space Team
parent
13baf43ae3
commit
41247e8cef
@@ -5,16 +5,18 @@
|
||||
|
||||
class Wrapper(x: Int)
|
||||
|
||||
// CHECK-LABEL: "kfun:#f(kotlin.Int;kotlin.String){}"
|
||||
fun f(x: Int, s: String) {
|
||||
// CHECK-LABEL: "kfun:#f(kotlin.Int;kotlin.String){}kotlin.String"
|
||||
fun f(x: Int, s: String): String {
|
||||
// CHECK: _ZN6kotlin2mm14ThreadRegistry22currentThreadDataNode_E
|
||||
// CHECK-NOT: _ZN6kotlin2mm14ThreadRegistry22currentThreadDataNode_E
|
||||
if (x < 0) throw IllegalStateException()
|
||||
if (x > 0) return f(x - 1, s)
|
||||
val b = Wrapper(2)
|
||||
val a = listOf(x, x, Wrapper(1), 2, x)
|
||||
for (i in a) { println("$s i") }
|
||||
return buildString {
|
||||
for (i in a) { appendLine("$s i") }
|
||||
}
|
||||
// CHECK: {{^}$}}
|
||||
}
|
||||
|
||||
fun main() { f(10, "123456") }
|
||||
fun main() { println(f(10, "123456")) }
|
||||
|
||||
Reference in New Issue
Block a user