x/tools/gopls: crashes when instantiating generic function types with multiple parameters #47943
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
What did you do?
I tried to implement a simple reduce function similar to https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce with the current generics implementation.
This works fine with gopls:
However when trying to extract the type for the reduce function (for better readability) gopls crashes while instantiating the reduce function with multiple parameters.
Pre crash:
When trying to instantiate another type parameter in the reducer (note the trailing comma), gopls crashes instantly, restarting gopls doesn't help.
The final code doesn't crash gopls:
gopls crash logs
The text was updated successfully, but these errors were encountered: