Files
kotlin-fork/compiler/testData/resolve/ImportingRootScopeWhenProcessingImports.resolve
T
Alexey Sedunov 608ce59f15 Resolution: Resolve primary constructor references to primary constructor
itself if it's explicitly present in PSI
2015-06-11 13:52:47 +03:00

30 lines
553 B
Plaintext
Vendored

// FILE: base.kt
class java {
class lang {
class ~Fake~Fake~Fake()~()
}
}
// FILE: root1.kt
import java.lang.* // will import Fake
fun foo() {
`Fake()`Fake()
}
// FILE: root2.kt
fun foo() {
`!`Fake() // not imported within "java.lang.*" default import
java.lang.`Fake()`Fake() // we all are in same (root) package, so it works
}
// FILE: nonRoot.kt
package nonRoot
import java.lang.* // will import Fake
fun foo() {
`Fake()`Fake()
java.lang.`!`Fake() // qualified access to root package's class does not work
}