Qualifier no longer defers "(nested) class vs package" resolution.
Consider FQN 'a.b.c'.
If 'a' is a classifier in the current scope,
resolve rest in the corresponding class scope.
Otherwise (if 'a' is a package),
find the maximum possible prefix 'a.b' resolving to a package,
resolve rest in the corresponding package scope.
This commit is contained in:
+6
-6
@@ -25,10 +25,10 @@ class a {}
|
||||
fun test(a_: a.<!UNRESOLVED_REFERENCE!>b<!>) {
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a_<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a_b<!>()
|
||||
|
||||
val a_2 = a.b()
|
||||
a_2.a_b() // todo: must be unresolved
|
||||
a_2.<!UNRESOLVED_REFERENCE!>some_ab<!>()
|
||||
a_2.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a_()<!>
|
||||
val a_2 = a.<!UNRESOLVED_REFERENCE!>b<!>()
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a_2<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a_b<!>()
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a_2<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>some_ab<!>()
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a_2<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a_<!>()
|
||||
}
|
||||
|
||||
// FILE: c2.kt
|
||||
@@ -44,7 +44,7 @@ fun test(_ab: a.b) {
|
||||
_ab.other2_ab()
|
||||
|
||||
val _ab2 = a.b()
|
||||
_ab2.<!UNRESOLVED_REFERENCE!>other2_ab<!>() // todo
|
||||
_ab2.other2_ab()
|
||||
}
|
||||
|
||||
// FILE: c3.kt
|
||||
@@ -54,5 +54,5 @@ fun test(_ab: a.b) {
|
||||
_ab.some_ab()
|
||||
|
||||
val _ab2 = a.b()
|
||||
_ab2.<!UNRESOLVED_REFERENCE!>some_ab<!>() // todo
|
||||
_ab2.some_ab()
|
||||
}
|
||||
Reference in New Issue
Block a user