FIR: handle double-imported qualifiers properly
This commit is contained in:
@@ -38,7 +38,7 @@ abstract class FirScope {
|
|||||||
open val scopeOwnerLookupNames: List<String> get() = emptyList()
|
open val scopeOwnerLookupNames: List<String> get() = emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun FirScope.getSingleClassifier(name: Name): FirClassifierSymbol<*>? = mutableListOf<FirClassifierSymbol<*>>().apply {
|
fun FirScope.getSingleClassifier(name: Name): FirClassifierSymbol<*>? = mutableSetOf<FirClassifierSymbol<*>>().apply {
|
||||||
processClassifiersByName(name, this::add)
|
processClassifiersByName(name, this::add)
|
||||||
}.singleOrNull()
|
}.singleOrNull()
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
|
|
||||||
package star
|
package star
|
||||||
|
|
||||||
class SomeClass
|
class SomeClass {
|
||||||
|
class Nested
|
||||||
|
}
|
||||||
|
|
||||||
fun foo() {}
|
fun foo() {}
|
||||||
|
|
||||||
@@ -32,6 +34,8 @@ import explicit.gau
|
|||||||
|
|
||||||
fun useSomeClass(): SomeClass = SomeClass()
|
fun useSomeClass(): SomeClass = SomeClass()
|
||||||
|
|
||||||
|
fun useNested(): SomeClass.Nested = SomeClass.Nested()
|
||||||
|
|
||||||
fun useAnotherClass(): AnotherClass = AnotherClass()
|
fun useAnotherClass(): AnotherClass = AnotherClass()
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package
|
|||||||
|
|
||||||
public fun test(): kotlin.Unit
|
public fun test(): kotlin.Unit
|
||||||
public fun useAnotherClass(): explicit.AnotherClass
|
public fun useAnotherClass(): explicit.AnotherClass
|
||||||
|
public fun useNested(): star.SomeClass.Nested
|
||||||
public fun useSomeClass(): star.SomeClass
|
public fun useSomeClass(): star.SomeClass
|
||||||
|
|
||||||
package explicit {
|
package explicit {
|
||||||
@@ -25,5 +26,12 @@ package star {
|
|||||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
public final class Nested {
|
||||||
|
public constructor Nested()
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user