KT-4310 Check for definite returns

#KT-4310 Fixed
This commit is contained in:
Svetlana Isakova
2013-12-16 20:00:53 +04:00
parent 43cc818506
commit 400e6d3f44
3 changed files with 24 additions and 2 deletions
@@ -0,0 +1,11 @@
package f
fun test(a: Boolean, b: Boolean): Int {
return if(a) {
1
} else {
<!TYPE_MISMATCH!>if (b) {
3
}<!>
} // no error, but must be
}