rokucommunity / brighterscript

A superset of Roku's BrightScript language
MIT License
153 stars 47 forks source link

Callfunc operator completions shows duplicate entries #662

Closed TwitchBronBron closed 1 year ago

TwitchBronBron commented 1 year ago

Brighterscript shows some "slightly helpful" completions after the callfunc operator. However, those values aren't deduped. We should only show distinct method names.

image

This can be fixed by tweaking the code here to build the callfunc completions into its own array, deduping them, and then adding them to the final event.completions array.

Add another unit test like this one that has multiple functions with the same name across multiple components, and make sure only a single completion for each name is returned.

TwitchBronBron commented 1 year ago

Looks like this is caused by having a child component that overrides a parent component's function.