K2: add test for KT-56520, case (4), callable references (unbound)
Again, both frontends here ignored classifiers from explicit star imported scope (some.HashMap, java.util.HashMap) because of their ambiguity. In case of K2, it works so due to logic in BodyResolveComponents.resolveRootPartOfQualifier. This function is called to resolve qualifier without receiver. See also cases (3) and (7).
This commit is contained in:
committed by
Space Team
parent
f0058ee0d8
commit
c2ac9daa7f
+4
@@ -0,0 +1,4 @@
|
||||
FILE: test.kt
|
||||
public final fun test(): R|kotlin/reflect/KProperty1<kotlin/collections/HashMap<kotlin/String, kotlin/String>, kotlin/Int>| {
|
||||
^test Q|kotlin/collections/HashMap|::R|SubstitutionOverride<java/util/HashMap.size: R|kotlin/Int|>|
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-56520 (case 4, unbound)
|
||||
// FIR_DUMP
|
||||
// FULL_JDK
|
||||
|
||||
// FILE: some/HashMap.java
|
||||
|
||||
package some;
|
||||
|
||||
public class HashMap<K, V> extends java.util.HashMap<K, V> {}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
import java.util.*
|
||||
import some.*
|
||||
|
||||
fun test() =
|
||||
// Ok in both K1 & K2.
|
||||
// K1 & K2 resolve this to kotlin.collections.HashMap.
|
||||
HashMap<String, String>::size
|
||||
Reference in New Issue
Block a user