Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/ls/findallreferences.go
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ func (l *LanguageService) getReferencedSymbolsForModule(ctx context.Context, pro
references: references,
}}
}
return nil
return []*SymbolAndEntries{}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What calling code depends on the difference? 😞

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two places in findallreferences.go. They specifically check for nil and branch accordingly. Ugly, but basically the same behavior with had in Strada (i.e. undefined vs possibly empty array).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, only one place depends on seeing nil:

if moduleReferences != nil && symbol.Flags&ast.SymbolFlagsTransient == 0 {

}

func getReferenceAtPosition(sourceFile *ast.SourceFile, position int, program *compiler.Program) *refInfo {
Expand Down
Loading