[FIR] Do not throw exception on unexpected FIR for constants
^KTIJ-23263 fixed Merge-request: KT-MR-10699 Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
This commit is contained in:
+1
-1
@@ -264,8 +264,8 @@ internal class KtSymbolByFirBuilder constructor(
|
||||
is FirFieldSymbol -> buildFieldSymbol(firSymbol)
|
||||
is FirEnumEntrySymbol -> buildEnumEntrySymbol(firSymbol) // TODO enum entry should not be callable
|
||||
is FirBackingFieldSymbol -> buildBackingFieldSymbol(firSymbol)
|
||||
is FirErrorPropertySymbol -> buildErrorVariableSymbol(firSymbol)
|
||||
|
||||
is FirErrorPropertySymbol -> throwUnexpectedElementError(firSymbol)
|
||||
is FirDelegateFieldSymbol -> throwUnexpectedElementError(firSymbol)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-4
@@ -66,10 +66,7 @@ internal class KtFirCompileTimeConstantProvider(
|
||||
// ```
|
||||
// `false` does not have a corresponding elements on the FIR side and hence the containing `FirWhenBranch` is returned. In this
|
||||
// case, we simply report null since FIR does not know about it.
|
||||
fir is FirWhenBranch -> null
|
||||
fir is FirVariableAssignment && fir.source?.kind == KtFakeSourceElementKind.DesugaredIncrementOrDecrement -> null
|
||||
fir is FirTypeRef -> null
|
||||
else -> throwUnexpectedFirElementError(fir, sourcePsi)
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user