sourcegraph / go-langserver

Go language server to add Go support to editors and other tools that use the Language Server Protocol (LSP)
https://sourcegraph.com
MIT License
1.17k stars 89 forks source link

langserver: fix case order in a type switch #346

Closed quasilyte closed 5 years ago

quasilyte commented 5 years ago

Concrete types should go before interfaces they implement, otherwise control will never reach them, since type switch matching is performen sequentially, from first case to the last one.

Found using gocritic "caseOrder" diagnostic.

Signed-off-by: Iskander Sharipov quasilyte@gmail.com