Skip to content

Commit ef2cec5

Browse files
committed
Fix incorrect check for diags
1 parent cb8b412 commit ef2cec5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/compiler/program.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ func (p *Program) getSemanticDiagnosticsForFileNotFilter(ctx context.Context, so
10711071
}
10721072

10731073
func (p *Program) getDiagnosticsWithPrecedingDirectives(sourceFile *ast.SourceFile, diags []*ast.Diagnostic) ([]*ast.Diagnostic, map[int]ast.CommentDirective) {
1074-
if len(diags) == 0 || len(sourceFile.CommentDirectives) == 0 {
1074+
if len(sourceFile.CommentDirectives) == 0 {
10751075
return diags, nil
10761076
}
10771077
// Build map of directives by line number

0 commit comments

Comments
 (0)