Test for obsolete KT-5448: VerifyError with mismatched stack types

#KT-5448 Obsolete
This commit is contained in:
Michael Bogdanov
2015-05-18 15:28:58 +03:00
parent 5cb9671803
commit 58183731f5
2 changed files with 26 additions and 0 deletions
@@ -0,0 +1,20 @@
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"
}