FIR: Fix incorrect type of block generated for inc operator
Previously, it was obtained from expected type of a variable being assigned,
but it's better to use the type of resulting expression
Initially this part was brought in 4ab0897d7d,
but as we see in commit message and tests it was all about unit-coercion
This commit is contained in:
committed by
teamcityserver
parent
a7859e0332
commit
c0b6a593e0
Vendored
+2
-2
@@ -6,8 +6,8 @@ fun test() {
|
||||
val x = <!ANONYMOUS_FUNCTION_WITH_NAME!>fun named1(x: Int): Int { return 1 }<!>
|
||||
x <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<Function1<Int, Int>>() }
|
||||
|
||||
foo { fun named2(): Int {return 1} }
|
||||
foo({ fun named3() = 1 })
|
||||
foo { <!ARGUMENT_TYPE_MISMATCH!>fun named2(): Int {return 1}<!> }
|
||||
foo({ <!ARGUMENT_TYPE_MISMATCH!>fun named3() = 1<!> })
|
||||
|
||||
val x1 =
|
||||
if (1 == 1)
|
||||
|
||||
Reference in New Issue
Block a user