[FIR] Use typeArgumentsList from delegatedTypeRef instead of accessing via tree
This commit is contained in:
+1
-1
@@ -226,7 +226,7 @@ open class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransform
|
||||
* DiagnosticsTestGenerated$Tests$ThisAndSuper.testGenericQualifiedSuperOverridden
|
||||
* DiagnosticsTestGenerated$Tests$ThisAndSuper.testQualifiedSuperOverridden
|
||||
*/
|
||||
val actualSuperTypeRef = actualSuperType?.toFirResolvedTypeRef(superTypeRef.source) ?: buildErrorTypeRef {
|
||||
val actualSuperTypeRef = actualSuperType?.toFirResolvedTypeRef(superTypeRef.source, superTypeRef) ?: buildErrorTypeRef {
|
||||
source = superTypeRef.source
|
||||
diagnostic = ConeSimpleDiagnostic("Not a super type", DiagnosticKind.NotASupertype)
|
||||
}
|
||||
|
||||
@@ -197,16 +197,19 @@ fun ConeKotlinType.toSymbol(session: FirSession): FirBasedSymbol<*>? {
|
||||
|
||||
fun ConeKotlinType.toFirResolvedTypeRef(
|
||||
source: FirSourceElement? = null,
|
||||
delegatedTypeRef: FirTypeRef? = null
|
||||
): FirResolvedTypeRef {
|
||||
return if (this is ConeKotlinErrorType) {
|
||||
buildErrorTypeRef {
|
||||
this.source = source
|
||||
diagnostic = this@toFirResolvedTypeRef.diagnostic
|
||||
this.delegatedTypeRef = delegatedTypeRef
|
||||
}
|
||||
} else {
|
||||
buildResolvedTypeRef {
|
||||
this.source = source
|
||||
type = this@toFirResolvedTypeRef
|
||||
this.delegatedTypeRef = delegatedTypeRef
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user