Add FIR enhancement tests, fix some exceptions / problems around them
Test data and tests themselves are based on compiler/testData/loadJava/compiledJava
This commit is contained in:
@@ -10,6 +10,7 @@ import org.jetbrains.kotlin.fir.BaseTransformedType
|
||||
import org.jetbrains.kotlin.fir.types.ConeClassLikeType
|
||||
import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.FirTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
import org.jetbrains.kotlin.fir.visitors.FirVisitor
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
|
||||
@@ -29,5 +30,8 @@ interface FirAnnotationCall : FirCall {
|
||||
}
|
||||
}
|
||||
|
||||
val FirAnnotationCall.coneClassLikeType: ConeClassLikeType?
|
||||
get() = ((annotationTypeRef as? FirResolvedTypeRef)?.type as? ConeClassLikeType)?.takeIf { it !is ConeClassErrorType }
|
||||
|
||||
val FirAnnotationCall.resolvedFqName: FqName?
|
||||
get() = ((annotationTypeRef as? FirResolvedTypeRef)?.type as? ConeClassLikeType)?.lookupTag?.classId?.asSingleFqName()
|
||||
get() = coneClassLikeType?.lookupTag?.classId?.asSingleFqName()
|
||||
|
||||
Reference in New Issue
Block a user