Do not request FirProvider for built-in synthesized classes
Because currently they don't have FIR and it might fail with an exception
This commit is contained in:
+1
-1
@@ -145,7 +145,6 @@ class FirSupertypeResolverTransformer : FirAbstractTreeTransformer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val sessionForSupertype = session.getService(FirSymbolProvider::class).getSessionForClass(superTypeClassId) ?: continue
|
val sessionForSupertype = session.getService(FirSymbolProvider::class).getSessionForClass(superTypeClassId) ?: continue
|
||||||
val provider = sessionForSupertype.getService(FirProvider::class)
|
|
||||||
|
|
||||||
val firClassForSupertype =
|
val firClassForSupertype =
|
||||||
sessionForSupertype
|
sessionForSupertype
|
||||||
@@ -155,6 +154,7 @@ class FirSupertypeResolverTransformer : FirAbstractTreeTransformer() {
|
|||||||
|
|
||||||
// TODO: this if is a temporary hack for built-in types (because we can't load file for them)
|
// TODO: this if is a temporary hack for built-in types (because we can't load file for them)
|
||||||
if (firClassForSupertype == null || firClassForSupertype.superTypeRefs.any { it !is FirResolvedTypeRef }) {
|
if (firClassForSupertype == null || firClassForSupertype.superTypeRefs.any { it !is FirResolvedTypeRef }) {
|
||||||
|
val provider = sessionForSupertype.getService(FirProvider::class)
|
||||||
val firForSuperClassFile = provider.getFirClassifierContainerFile(superTypeClassId)
|
val firForSuperClassFile = provider.getFirClassifierContainerFile(superTypeClassId)
|
||||||
|
|
||||||
ResolveSuperTypesTask(
|
ResolveSuperTypesTask(
|
||||||
|
|||||||
Reference in New Issue
Block a user