NI: Analyze lambdas which are return arguments of another lambda
^KT-36044 Fixed
This commit is contained in:
Vendored
+8
@@ -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
|
||||
}
|
||||
))
|
||||
Vendored
+2
@@ -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> { })
|
||||
}
|
||||
+2
@@ -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> { })
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
Failures detected in FirBodyResolveTransformerAdapter, file: /kt36044.fir.kt
|
||||
Cause: java.lang.RuntimeException: While resolving call R?C|/select|(Char(a), R?C|/map|(<L> = map@fun <anonymous>(): <ERROR TYPE REF: No type for block> {
|
||||
^ map@fun <implicit>.<anonymous>(): <implicit> {
|
||||
String()
|
||||
}
|
||||
|
||||
}
|
||||
))
|
||||
@@ -0,0 +1,9 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// Issue: KT-36044
|
||||
|
||||
fun <A> select(x: A, f: () -> A) = f()
|
||||
fun <B> map(f: () -> B) = f()
|
||||
|
||||
fun main() {
|
||||
select('a', map { { "" } })
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// Issue: KT-36044
|
||||
|
||||
fun <A> select(x: A, f: () -> A) = f()
|
||||
fun <B> map(f: () -> B) = f()
|
||||
|
||||
fun main() {
|
||||
select('a', map { { "" } })
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
public fun </*0*/ B> map(/*0*/ f: () -> B): B
|
||||
public fun </*0*/ A> select(/*0*/ x: A, /*1*/ f: () -> A): A
|
||||
Reference in New Issue
Block a user