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
This commit is contained in:
committed by
Space Team
parent
5d7ac18778
commit
60f09f6512
+29
@@ -0,0 +1,29 @@
|
||||
// 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<!> <!DEBUG_INFO_MISSING_UNRESOLVED!>+<!> 1
|
||||
y + 1
|
||||
|
||||
<!UNRESOLVED_REFERENCE!>foo<!>() <!DEBUG_INFO_MISSING_UNRESOLVED!>+<!> 1
|
||||
bar() + 1
|
||||
}
|
||||
Reference in New Issue
Block a user