FIR: prioritize visible imported classes during type resolution

and produce an error on ambiguity.
This commit is contained in:
pyos
2021-02-10 16:45:35 +01:00
committed by Mikhail Glukhikh
parent 291ed4a38a
commit 2dc0404751
25 changed files with 160 additions and 198 deletions
@@ -22,8 +22,8 @@ class A {
import p1.*
import p2.*
fun test(a: A) {
a.m1()
fun test(a: <!UNRESOLVED_REFERENCE!>A<!>) {
a.<!UNRESOLVED_REFERENCE!>m1<!>()
a.<!UNRESOLVED_REFERENCE!>m2<!>()
}
@@ -39,8 +39,8 @@ import p1.*
import p2.*
import p3.*
fun test(a: A) {
a.v1
fun test(a: <!UNRESOLVED_REFERENCE!>A<!>) {
a.<!UNRESOLVED_REFERENCE!>v1<!>
a.<!UNRESOLVED_REFERENCE!>v2<!>
a.<!UNRESOLVED_REFERENCE!>v3<!>
}
@@ -23,8 +23,8 @@ class A {
import p1.*
import p2.*
fun test(a: A) {
a.m1()
fun test(a: <!UNRESOLVED_REFERENCE!>A<!>) {
a.<!UNRESOLVED_REFERENCE!>m1<!>()
a.<!UNRESOLVED_REFERENCE!>m2<!>()
}
@@ -40,8 +40,8 @@ import p1.*
import p2.*
import p3.*
fun test(a: A) {
a.v1
fun test(a: <!UNRESOLVED_REFERENCE!>A<!>) {
a.<!UNRESOLVED_REFERENCE!>v1<!>
a.<!UNRESOLVED_REFERENCE!>v2<!>
a.<!UNRESOLVED_REFERENCE!>v3<!>
}