diff --git a/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/RefOveruseDiagnostic.java b/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/RefOveruseDiagnostic.java index 0371f8a5608..0029f2548c9 100644 --- a/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/RefOveruseDiagnostic.java +++ b/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/RefOveruseDiagnostic.java @@ -248,6 +248,7 @@ private List getTabularSectionNames(SDBLParser.MdoContext mdo) { .map(configuration::findChild) .filter(Optional::isPresent) .map(Optional::get) + .filter(TabularSectionOwner.class::isInstance) .map(TabularSectionOwner.class::cast) .flatMap(RefOveruseDiagnostic::getTabularSectionNames) .collect(Collectors.toList());