Frontend part of KT-910 Type of try/catch/finally
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package a
|
||||
|
||||
fun foo() : Int {
|
||||
try {
|
||||
doSmth()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
<!UNREACHABLE_CODE!>return <!TYPE_MISMATCH!>""<!><!>
|
||||
}
|
||||
finally {
|
||||
return <!TYPE_MISMATCH!>""<!>
|
||||
}
|
||||
}
|
||||
|
||||
fun bar() : Int =
|
||||
try {
|
||||
<!TYPE_MISMATCH!>doSmth()<!>
|
||||
}
|
||||
catch (e: Exception) {
|
||||
<!TYPE_MISMATCH!>""<!>
|
||||
}
|
||||
finally {
|
||||
<!UNUSED_EXPRESSION!>""<!>
|
||||
}
|
||||
|
||||
|
||||
fun doSmth() {}
|
||||
Reference in New Issue
Block a user