resolve a!! as call

This commit is contained in:
Svetlana Isakova
2013-08-02 14:13:00 +04:00
parent 46cb6b3242
commit aba70e047d
6 changed files with 164 additions and 96 deletions
@@ -1,27 +0,0 @@
package b
fun bar(i: Int) = i
fun test(a: Int?, b: Int?) {
bar(if (a == null) return else <!TYPE_MISMATCH!>b<!>)
}
fun test(a: Int?, b: Int?, c: Int?) {
bar(if (a == null) return else if (b == null) return else <!TYPE_MISMATCH!>c<!>)
}
fun test(a: Any?, b: Any?, c: Int?) {
bar(if (a == null) if (b == null) <!TYPE_MISMATCH!>c<!> else return else return)
}
fun test(a: Int?, b: Any?, c: Int?) {
bar(if (a == null) {
return
} else {
if (b == null) {
return
} else {
<!TYPE_MISMATCH!>c<!>
}
})
}