[FIR] Fix inconsistent RETURN_TYPE_MISMATCH and TYPE_MISMATCH reporting on functions and properties
^KT-51203 Fixed
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ fun testResultOfAnonFun2() =
|
||||
|
||||
fun testReturnFromAnonFun() =
|
||||
run(fun () {
|
||||
return if (true) 42 else println()
|
||||
return <!RETURN_TYPE_MISMATCH!>if (true) 42 else println()<!>
|
||||
})
|
||||
|
||||
fun testReturn1() =
|
||||
|
||||
@@ -37,9 +37,9 @@ fun test4() = run {
|
||||
|
||||
val foo: Int
|
||||
get() = run {
|
||||
if (true) return ""
|
||||
if (true) return <!RETURN_TYPE_MISMATCH!>""<!>
|
||||
|
||||
return
|
||||
<!RETURN_TYPE_MISMATCH!>return<!>
|
||||
}
|
||||
|
||||
fun test(): Int = run {
|
||||
|
||||
Reference in New Issue
Block a user