Importing root scope without members.

This commit is contained in:
Evgeny Gerashchenko
2014-01-15 21:05:37 +04:00
parent 78e7cbb7fb
commit ae4c68830d
61 changed files with 316 additions and 89 deletions
@@ -4,8 +4,6 @@ public enum A {
}
// FILE: test.kt
package test
fun main() {
A.valueOf("ENTRY"): A
}
@@ -5,8 +5,6 @@ public enum A {
}
// FILE: test.kt
package vvv
fun main() {
A.values(): Array<A>
}
@@ -10,8 +10,6 @@ public enum A {
}
// FILE: test.kt
package test
fun main() {
A.ENTRY.s(): String?
}
@@ -10,8 +10,6 @@ public enum A {
// FILE: test.kt
package vvv
fun main() {
val c = A.ENTRY
c.s()
@@ -8,8 +8,6 @@ public enum A {
// FILE: test.kt
package vvv
fun main() {
val c: A = A.ENTRY
val <!UNUSED_VARIABLE!>c2<!>: String? = c.ENTRY
@@ -12,8 +12,6 @@ public enum A {
// FILE: test.kt
package vvv
fun main() {
val c = A.ENTRY
c.s
@@ -1,12 +1,12 @@
// FILE: checkAmbiguityBetweenRootAndPackage.kt
package test
val t = <!OVERLOAD_RESOLUTION_AMBIGUITY!>testFun<!>()
// FILE: checkAmbiguityBetweenRootAndPackageRoot.kt
// FILE: root.kt
fun testFun() = 12
// FILE: checkAmbiguityBetweenRootAndPackageTest.kt
// FILE: otherPackage.kt
package test
fun testFun() = 12
fun testFun() = 12
// FILE: using.kt
import test.*
val t = <!OVERLOAD_RESOLUTION_AMBIGUITY!>testFun<!>()
@@ -0,0 +1,12 @@
// FILE: root.kt
fun testFun() = 12
// FILE: otherPackage.kt
package test
fun testFun() = 12
// FILE: using.kt
package test
val t = testFun()
@@ -0,0 +1,25 @@
// FILE: rootPackage.kt
class Klass {
}
fun function() = ""
val property = ""
// FILE: anotherFromRootPackage.kt
fun foo() {
Klass()
function() + property
}
// FILE: anotherFromRootPackage.kt
package pkg
import <!UNRESOLVED_REFERENCE!>Klass<!>
import <!UNRESOLVED_REFERENCE!>function<!>
import <!UNRESOLVED_REFERENCE!>property<!>
fun foo() {
<!UNRESOLVED_REFERENCE!>Klass<!>()
<!UNRESOLVED_REFERENCE!>function<!>() <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>+<!> <!UNRESOLVED_REFERENCE!>property<!>
}