[FIR] Fix resolve inside lambda
The lambda is passed to extension function with type parameters that defined inside this lambda ^KT-52197 ^KT-52190 Fixed
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
// WITH_STDLIB
|
||||
// ISSUE: KT-52197
|
||||
|
||||
fun <K, V> helper(builderAction: MutableMap<K, V>.() -> Unit) {
|
||||
builderAction(mutableMapOf())
|
||||
}
|
||||
|
||||
fun test(){
|
||||
helper {
|
||||
val x = put("key", "value")
|
||||
if (x != null) {
|
||||
"Error: $x"
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// WITH_STDLIB
|
||||
// ISSUE: KT-52197
|
||||
|
||||
fun <K, V> helper(builderAction: MutableMap<K, V>.() -> Unit) {
|
||||
builderAction(mutableMapOf())
|
||||
}
|
||||
|
||||
fun test(){
|
||||
helper {
|
||||
val x = put("key", "value")
|
||||
if (x != null) {
|
||||
"Error: $x"
|
||||
x.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, DEBUG_INFO_UNRESOLVED_WITH_TARGET, UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
x.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, DEBUG_INFO_UNRESOLVED_WITH_TARGET, UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ K, /*1*/ V> helper(/*0*/ builderAction: kotlin.collections.MutableMap<K, V>.() -> kotlin.Unit): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
Reference in New Issue
Block a user