[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
@@ -103,7 +103,7 @@ fun main() {
select(
id { x, y -> <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>x<!>.inv() + <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number")!>y<!>.toByte() },
id<(Int, Number) -> Int> { x, y -> x.inv() },
{} as (Number, Number) -> Int
<!RETURN_TYPE_MISMATCH!>{}<!> as (Number, Number) -> Int
)
// Inferring lambda parameter types by a few expected types (a few upper constraints)