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
+1
-1
@@ -155,7 +155,7 @@ fun main() {
|
||||
select(id(id(fun(x: String, y: String) { }), <!TOO_MANY_ARGUMENTS!>fun String.(x: String) {}<!>), { x, y -> x })
|
||||
val x26: Int.(String) -> Int = fun (x: String) = 10 // it must be error, see KT-38439
|
||||
// Receiver must be specified in anonymous function declaration
|
||||
val x27: Int.(String) -> Int = id(<!ARGUMENT_TYPE_MISMATCH!>fun (x: String) = 10<!>)
|
||||
val x27: Int.(String) -> Int = id(<!ARGUMENT_TYPE_MISMATCH, ARGUMENT_TYPE_MISMATCH!>fun (x: String) = 10<!>)
|
||||
select(id<Int.(String) -> Unit> {}, { x: Int, y: String -> x })
|
||||
|
||||
// Inferring lambda parameter types by partially specified parameter types of other lambdas
|
||||
|
||||
Reference in New Issue
Block a user