[FIR] Count alias reference with type arguments as qualifier w/out value
This commit is contained in:
@@ -207,6 +207,7 @@ class FirCallResolver(
|
||||
referencedSymbol is FirClassLikeSymbol<*> -> {
|
||||
val classId = referencedSymbol.classId
|
||||
return FirResolvedQualifierImpl(nameReference.source, classId.packageFqName, classId.relativeClassName).apply {
|
||||
typeArguments.addAll(qualifiedAccess.typeArguments)
|
||||
resultType = if (classId.isLocal) {
|
||||
typeForQualifierByDeclaration(referencedSymbol.fir, resultType, session)
|
||||
?: resultType.resolvedTypeFromPrototype(
|
||||
|
||||
@@ -320,7 +320,9 @@ fun BodyResolveComponents.typeForQualifier(resolvedQualifier: FirResolvedQualifi
|
||||
val classSymbol = symbolProvider.getClassLikeSymbolByFqName(classId)
|
||||
?: return FirErrorTypeRefImpl(source = null, diagnostic = FirSimpleDiagnostic("No type for qualifier", DiagnosticKind.Other))
|
||||
val declaration = classSymbol.phasedFir
|
||||
typeForQualifierByDeclaration(declaration, resultType, session)?.let { return it }
|
||||
if (declaration !is FirTypeAlias || resolvedQualifier.typeArguments.isEmpty()) {
|
||||
typeForQualifierByDeclaration(declaration, resultType, session)?.let { return it }
|
||||
}
|
||||
}
|
||||
// TODO: Handle no value type here
|
||||
return resultType.resolvedTypeFromPrototype(
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ class C<T1, T2> {
|
||||
|
||||
typealias C2<T> = C<T, T>
|
||||
|
||||
val test1: String = C2<String>.OK
|
||||
val test1: String = C2<String>.<!UNRESOLVED_REFERENCE!>OK<!>
|
||||
val test2: String = C2.OK
|
||||
|
||||
Reference in New Issue
Block a user