[FIR] KT-58523: Check the companion presence when resolving type-aliases

The change in `QualifiedNameResolution.kt` is
backed by `starImportOnTypeAlias.fir.kt` and
`javaStaticMembersViaTypeAlias.fir.kt`.
Note that referencing inner classes via type-aliases is
prohibited, but referencing enum entries is not.

^KT-58523 Fixed
This commit is contained in:
Nikolay Lunyak
2023-05-10 15:40:46 +03:00
committed by Space Team
parent 99ff36c77a
commit 7b45f75213
7 changed files with 45 additions and 55 deletions
@@ -1,18 +0,0 @@
// ISSUE: KT-58523
// FILE: pkg.kt
package pkg
class Klass
typealias ItemKey = Klass
// FILE: main.kt
import pkg.ItemKey
val ItemKey = 42
fun main() {
<!NO_COMPANION_OBJECT!>ItemKey<!> // K1: ok, K2: NO_COMPANION_OBJECT
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// ISSUE: KT-58523
// FILE: pkg.kt