JVM_IR add test for KT-49411
This commit is contained in:
committed by
TeamCityServer
parent
56cf2549e7
commit
e76cf8550e
@@ -0,0 +1,22 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
|
||||
abstract class Foo<T>(@JvmField val foo: T)
|
||||
|
||||
class Bar(foo: Int) : Foo<Int>(foo)
|
||||
|
||||
fun box(): String {
|
||||
var s1 = ""
|
||||
for (i in Bar(3).foo.downTo(1)) {
|
||||
s1 = s1 + i
|
||||
}
|
||||
if (s1 != "321") return "Failed: s1='$s1'"
|
||||
|
||||
var s2 = ""
|
||||
for (i in 3.downTo(Bar(1).foo)) {
|
||||
s2 = s2 + i
|
||||
}
|
||||
if (s2 != "321") return "Failed: s2='$s2'"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user