[FIR] Fix inconsistent RETURN_TYPE_MISMATCH and TYPE_MISMATCH reporting on functions and properties

^KT-51203 Fixed
This commit is contained in:
Ivan Kochurkin
2022-03-17 16:34:19 +03:00
committed by teamcity
parent 4617615fd9
commit c6f52893fb
42 changed files with 82 additions and 77 deletions
@@ -2,8 +2,8 @@ val foo = fun(a: Int): String {
if (a == 1) return "4"
when (a) {
5 -> return "2"
3 -> return null
2 -> return 2
3 -> return <!NULL_FOR_NONNULL_TYPE!>null<!>
2 -> return <!RETURN_TYPE_MISMATCH!>2<!>
}
return ""
}
}