[FIR] Simplify utility for extracting constructor from FirAnnotation
This commit is contained in:
committed by
Space Team
parent
02c08a4673
commit
e6fbcb5567
@@ -515,14 +515,7 @@ private val FirExpression.isCallToStatementLikeFunction: Boolean
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun FirAnnotation.getCorrespondingClassSymbolOrNull(session: FirSession): FirRegularClassSymbol? {
|
fun FirAnnotation.getCorrespondingClassSymbolOrNull(session: FirSession): FirRegularClassSymbol? {
|
||||||
return annotationTypeRef.coneType.fullyExpandedType(session).classId?.let {
|
return annotationTypeRef.coneType.fullyExpandedType(session).toRegularClassSymbol(session)
|
||||||
if (it.isLocal) {
|
|
||||||
// TODO: How to retrieve local annotaiton's constructor?
|
|
||||||
null
|
|
||||||
} else {
|
|
||||||
(session.symbolProvider.getClassLikeSymbolByClassId(it) as? FirRegularClassSymbol)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun BodyResolveComponents.initialTypeOfCandidate(candidate: Candidate): ConeKotlinType {
|
fun BodyResolveComponents.initialTypeOfCandidate(candidate: Candidate): ConeKotlinType {
|
||||||
|
|||||||
Reference in New Issue
Block a user