Files
kotlin-fork/compiler/testData/diagnostics/tests/imports/ImportFromCurrentWithDifferentNameComplex.fir.kt
Denis.Zharkov 60f09f6512 K2: Adjust renaming on import for current package with K1 rules
Namely, once a file in a package `foo` has import `foo.bar as baz`,
auto imported `bar` from the package name becomes inivisible in the file

^KT-54854 Fixed
2023-06-23 10:58:08 +00:00

30 lines
373 B
Kotlin
Vendored

// ISSUE: KT-54854
package a
import a.A as ER
import a.x as y
import a.foo as bar
val x: Int = 1
fun foo(): Int = 1
class A
interface B {
val a: <!UNRESOLVED_REFERENCE!>A<!>
val b: ER
}
fun main() {
<!UNRESOLVED_REFERENCE!>A<!>()
ER()
a.A()
<!UNRESOLVED_REFERENCE!>x<!> + 1
y + 1
<!UNRESOLVED_REFERENCE!>foo<!>() + 1
bar() + 1
}