c7435ba760
We are going to deprecate `WITH_RUNTIME` directive. The main reason behind this change is that `WITH_STDLIB` directive better describes its meaning, specifically it will add kotlin stdlib to test's classpath.
23 lines
322 B
Kotlin
Vendored
23 lines
322 B
Kotlin
Vendored
// WITH_STDLIB
|
|
|
|
class A
|
|
|
|
class B(val items: Collection<A>)
|
|
|
|
class C {
|
|
fun foo(p: Int) {
|
|
when (p) {
|
|
1 -> arrayListOf<Int>().add(1)
|
|
}
|
|
}
|
|
|
|
fun bar() = B(listOf<A>().map { it })
|
|
}
|
|
|
|
fun box(): String {
|
|
C().foo(1)
|
|
if (C().bar().items.isNotEmpty()) return "fail"
|
|
|
|
return "OK"
|
|
}
|