FIR checker: make unused checker handle invoke properly
#KT-43688 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
d907c48d9c
commit
44c6ec2c44
@@ -0,0 +1,5 @@
|
||||
fun foo(): Int {
|
||||
val x = fun() = 4
|
||||
val y = fun() = 2
|
||||
return 10 * x() + y()
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
FILE: invoke.kt
|
||||
public final fun foo(): R|kotlin/Int| {
|
||||
lval x: R|() -> kotlin/Int| = fun <anonymous>(): R|kotlin/Int| {
|
||||
^ Int(4)
|
||||
}
|
||||
|
||||
lval y: R|() -> kotlin/Int| = fun <anonymous>(): R|kotlin/Int| {
|
||||
^ Int(2)
|
||||
}
|
||||
|
||||
^foo Int(10).R|kotlin/Int.times|(R|<local>/x|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Int|>|()).R|kotlin/Int.plus|(R|<local>/y|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Int|>|())
|
||||
}
|
||||
Reference in New Issue
Block a user