[FIR] Fix constructors aliased importing
This commit is contained in:
+4
-5
@@ -39,9 +39,8 @@ internal fun FirScope.processFunctionsAndConstructorsByName(
|
||||
processor,
|
||||
session,
|
||||
bodyResolveComponents.scopeSession,
|
||||
name,
|
||||
noInnerConstructors
|
||||
)
|
||||
noInnerConstructors
|
||||
)
|
||||
|
||||
processSyntheticConstructors(
|
||||
matchedClassSymbol,
|
||||
@@ -131,7 +130,6 @@ private fun processConstructors(
|
||||
processor: (FirFunctionSymbol<*>) -> Unit,
|
||||
session: FirSession,
|
||||
scopeSession: ScopeSession,
|
||||
name: Name,
|
||||
noInner: Boolean
|
||||
) {
|
||||
try {
|
||||
@@ -152,7 +150,8 @@ private fun processConstructors(
|
||||
|
||||
val constructorName = when (matchedSymbol) {
|
||||
is FirTypeAliasSymbol -> finalExpansionName(matchedSymbol, session) ?: return
|
||||
is FirClassSymbol -> name
|
||||
is FirRegularClassSymbol -> matchedSymbol.fir.name
|
||||
else -> return
|
||||
}
|
||||
|
||||
//TODO: why don't we use declared member scope at this point?
|
||||
|
||||
@@ -12,7 +12,7 @@ import foo.A as B
|
||||
|
||||
fun test_1() {
|
||||
val a = <!UNRESOLVED_REFERENCE!>A<!>()
|
||||
val b = <!UNRESOLVED_REFERENCE!>B<!>() // should be OK
|
||||
val b = B() // should be OK
|
||||
val c: B = <!UNRESOLVED_REFERENCE!>A<!>()
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ FILE: A.kt
|
||||
FILE: main.kt
|
||||
public final fun test_1(): R|kotlin/Unit| {
|
||||
lval a: <ERROR TYPE REF: Unresolved name: A> = <Unresolved name: A>#()
|
||||
lval b: <ERROR TYPE REF: Unresolved name: B> = <Unresolved name: B>#()
|
||||
lval b: R|foo/A| = R|foo/A.A|()
|
||||
lval c: R|foo/A| = <Unresolved name: A>#()
|
||||
}
|
||||
public final fun test_2(b: R|foo/A|): R|kotlin/Unit| {
|
||||
|
||||
Reference in New Issue
Block a user