[FIR] Fix false positive RETURN_TYPE_MISMATCH in intellij ultimate
This commit is contained in:
Vendored
+1
-1
@@ -12,7 +12,7 @@ val a: () -> Unit = l@{
|
||||
|
||||
val b: () -> Unit = l@{
|
||||
// Error, coercion can't be applied at this position!
|
||||
if (true) return@l <!RETURN_TYPE_MISMATCH!>"hello"<!>
|
||||
if (true) return@l "hello"
|
||||
|
||||
// However, this is OK, because here coercion is applied
|
||||
"hello"
|
||||
|
||||
Vendored
+1
-1
@@ -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() },
|
||||
<!RETURN_TYPE_MISMATCH!>{}<!> as (Number, Number) -> Int
|
||||
{} as (Number, Number) -> Int
|
||||
)
|
||||
|
||||
// Inferring lambda parameter types by a few expected types (a few upper constraints)
|
||||
|
||||
Reference in New Issue
Block a user