FIR: fix a bunch of issues after DiagnosticsReporter refactoring related to reporting diagnostic on null source
This commit is contained in:
committed by
Space Team
parent
a7edf5b83e
commit
69f2e8826a
+2
-2
@@ -91,10 +91,10 @@ object FirNativeThrowsChecker : FirBasicDeclarationChecker() {
|
||||
val (overriddenMember, overriddenThrows) = inherited.firstOrNull()
|
||||
?: return true // Should not happen though.
|
||||
|
||||
if (decodeThrowsFilter(throwsAnnotation, context.session) != overriddenThrows) {
|
||||
if (throwsAnnotation?.source != null && decodeThrowsFilter(throwsAnnotation, context.session) != overriddenThrows) {
|
||||
val containingClassSymbol = overriddenMember.containingClassLookupTag()?.toFirRegularClassSymbol(context.session)
|
||||
if (containingClassSymbol != null) {
|
||||
reporter.reportOn(throwsAnnotation?.source, FirNativeErrors.INCOMPATIBLE_THROWS_OVERRIDE, containingClassSymbol, context)
|
||||
reporter.reportOn(throwsAnnotation.source, FirNativeErrors.INCOMPATIBLE_THROWS_OVERRIDE, containingClassSymbol, context)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user