This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Commit 2f51db3
langserver: fix case order in a type switch (#346)
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>1 parent 87d2c04 commit 2f51db3
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
| |||
154 | 157 | | |
155 | 158 | | |
156 | 159 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
0 commit comments