[FIR] Implement CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON diagnostic

This commit is contained in:
Andrey Zinovyev
2021-06-01 16:33:07 +03:00
committed by Space
parent fdd9287836
commit bf153ab0f0
39 changed files with 347 additions and 139 deletions
@@ -1,24 +0,0 @@
// import all members from companion object
package c
import c.A.Companion.B
import c.M.*
fun foo() {
val b: B = B()
var r: R = R()
}
class A() {
companion object {
class B() {
companion object {
}
}
}
}
object M {
fun foo() {}
class R() {}
}
+1
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// import all members from companion object
package c
+2 -2
View File
@@ -2,7 +2,7 @@ package d
//import from objects before properties resolve
import d.A.*
import d.<!CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON!>A<!>.*
import d.M.R
import d.M.R.bar
import d.M.T
@@ -14,7 +14,7 @@ val y: T = Y
fun f() {
bar()
R.bar()
B.foo()
<!UNRESOLVED_REFERENCE!>B<!>.foo()
}
object M {