Files
kotlin-fork/compiler/testData/diagnostics/tests/scopes/kt900-1.kt
T
Roman Golyshev 99c7fab401 KT-59732 [FIR] Adjust test data for the absence of unresolved imports
Now there are no real unresolved imports - all imports are considered
resolved starting from the IMPORTS phase and until they are proven
otherwise in the checkers.

Because of that, some `UNRESOLVED_REFERENCE` diagnostics are gone -
in the cases when such references were actually resolved through
those unsupported imports.

The compilation of incorrect files should not be affected by this,
the checkers would still prevent the compilation of the files with
incorrect imports.
But now the references to the declarations from such imports no longer
will be highlighted as unresolved references.
2023-12-04 16:51:46 +00:00

25 lines
410 B
Kotlin
Vendored

// import all members from companion object
package c
import c.A.Companion.B
import c.<!CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON!>M<!>.*
fun foo() {
val b: B = B()
var r: <!UNRESOLVED_REFERENCE!>R<!> = <!UNRESOLVED_REFERENCE!>R<!>()
}
class A() {
companion object {
class B() {
companion object {
}
}
}
}
object M {
fun foo() {}
class R() {}
}