Extraction Engine: Consider declarations when comparing descriptors

#KT-6960 Fixed
This commit is contained in:
Alexey Sedunov
2015-03-16 20:20:00 +03:00
parent 502b67ecc0
commit 93f00db871
8 changed files with 43 additions and 11 deletions
@@ -0,0 +1,8 @@
import java.util.HashMap;
import java.util.Map;
class J {
public static Map<Boolean, Boolean> getMap() {
return new HashMap<Boolean, Boolean>();
}
}
@@ -0,0 +1,6 @@
// WITH_RUNTIME
// PARAM_DESCRIPTOR: value-parameter val it: kotlin.Map.Entry<(Boolean..Boolean?), (Boolean..Boolean?)> defined in test.<anonymous>
// PARAM_TYPES: kotlin.Map.Entry<(Boolean..Boolean?), (Boolean..Boolean?)>
fun test() {
J.getMap().filter { <selection>it.getKey()</selection> }
}
@@ -0,0 +1,8 @@
// WITH_RUNTIME
// PARAM_DESCRIPTOR: value-parameter val it: kotlin.Map.Entry<(Boolean..Boolean?), (Boolean..Boolean?)> defined in test.<anonymous>
// PARAM_TYPES: kotlin.Map.Entry<(Boolean..Boolean?), (Boolean..Boolean?)>
fun test() {
J.getMap().filter { b(it) }
}
private fun b(it: Map.Entry<Boolean, Boolean>) = it.getKey()