JVM add tests for KT-49615
This commit is contained in:
committed by
teamcityserver
parent
7e633cf217
commit
8b066fd345
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user