Fix KotlinBuiltIns.isUnit

It didn't check type's nullability
This commit is contained in:
Alexander Udalov
2013-12-11 17:55:06 +04:00
parent 2892907947
commit 9e5c68a8f9
5 changed files with 25 additions and 10 deletions
@@ -86,11 +86,11 @@ fun doSmth(<!UNUSED_PARAMETER!>i<!>: Int) {}
fun testImplicitCoercion() {
val d = 21
var z = 0
var <!UNUSED_VARIABLE!>i<!> = <!IMPLICIT_CAST_TO_UNIT_OR_ANY!>when(d) {
var <!UNUSED_VARIABLE!>i<!> = when(d) {
3 -> null
4 -> { val <!NAME_SHADOWING, UNUSED_VARIABLE!>z<!> = 23 }
else -> z = 20
}<!>
}
var <!UNUSED_VARIABLE!>u<!> = <!IMPLICIT_CAST_TO_UNIT_OR_ANY!>when(d) {
3 -> {