NI: Analyze lambdas which are return arguments of another lambda

^KT-36044 Fixed
This commit is contained in:
Victor Petukhov
2020-03-11 18:55:55 +03:00
parent 426738b7d4
commit b1c4b5f51b
14 changed files with 156 additions and 30 deletions
@@ -0,0 +1,8 @@
Failures detected in FirBodyResolveTransformerAdapter, file: /nestedCallWithOverload.fir.kt
Cause: java.lang.RuntimeException: While resolving call R?C|/baz|(R?C|/id|(<L> = id@fun <implicit>.<anonymous>(): <implicit> {
it#.inv#()
}
), R|/id|<R|(kotlin/Int) -> kotlin/Unit|>(<L> = id@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| {
Unit
}
))
@@ -19,4 +19,6 @@ fun test() {
baz<(Int) -> Unit>(id(::foo), id(id(::foo)))
baz(id(::foo), id(id<(Int) -> Unit>(::foo)))
baz(id(<!UNRESOLVED_REFERENCE!>::foo<!>), id<(Int) -> Unit>(id(::foo)))
baz(id { it.inv() }, id<(Int) -> Unit> { })
}
@@ -19,4 +19,6 @@ fun test() {
baz<(Int) -> Unit>(id(::foo), id(id(::foo)))
baz(id(::foo), id(id<(Int) -> Unit>(::foo)))
baz(id(::foo), id<(Int) -> Unit>(id(::foo)))
baz(id { it.inv() }, id<(Int) -> Unit> { })
}