5a6237b357
Try resolving the LHS only when it looks (PSI-wise) like it could represent a type element. This, for example, allows "illegal selector" error to be reported on weird expressions like '""?.""::class'. Also remove expression text from the "illegal selector" diagnostic, it's not needed and can screw up the error message if the text is too big
17 lines
260 B
Kotlin
Vendored
17 lines
260 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
|
// FILE: simpleName.kt
|
|
|
|
package foo
|
|
|
|
fun test() {
|
|
<!EXPRESSION_EXPECTED_PACKAGE_FOUND!>foo<!>::test
|
|
}
|
|
|
|
// FILE: qualifiedName.kt
|
|
|
|
package foo.bar
|
|
|
|
fun test() {
|
|
foo.<!EXPRESSION_EXPECTED_PACKAGE_FOUND!>bar<!>::test
|
|
}
|