[FIR] Implement CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON diagnostic
This commit is contained in:
@@ -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,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// import all members from companion object
|
||||
package c
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user