Files
kotlin-fork/compiler/testData/ir/irText/firProblems/kt19251.kt.txt
T
Alexander Udalov 584b70719e JVM IR: disable SAM conversion in case type has 'in' projection
... and the corresponding type parameter has a non-trivial (i.e.
non-`Any?`) upper bound.

The best solution here would be to get rid of
`removeExternalProjections` completely, and just use the type of the
argument at the call site, but see KT-52428.

 #KT-51868 Fixed
2022-07-23 01:10:53 +02:00

12 lines
536 B
Kotlin
Vendored

fun box(): String {
val map: MutableMap<Fun, String> = mutableMapOf<Fun, String>()
val fn: Fun = local fun <anonymous>(it: @FlexibleNullability String?): @FlexibleNullability String? {
return TODO()
}
/*-> Fun */
return map.computeIfAbsent(p0 = fn, p1 = local fun <anonymous>(it: @EnhancedNullability Fun): @EnhancedNullability String {
return "OK"
}
/*as Function1<@EnhancedNullability Any?, @EnhancedNullability String> */ /*-> @EnhancedNullability Function<Any?, @EnhancedNullability String> */) /*!! String */
}