@@ -198,6 +198,72 @@ const test_cases = [
198198 expected: '${mod1_text_file }:25:1'
199199 description: 'Go to imported enum value definition'
200200 },
201+ // test_operator_overload() tests
202+ TestCase{
203+ name: 'operator_receiver_type'
204+ line: 137
205+ col: 8
206+ expected: '${test_file }:133:7'
207+ description: 'Go to struct definition from operator overload receiver type'
208+ },
209+ TestCase{
210+ name: 'operator_param_type'
211+ line: 137
212+ col: 22
213+ expected: '${test_file }:133:7'
214+ description: 'Go to struct definition from operator overload parameter type'
215+ },
216+ TestCase{
217+ name: 'operator_return_type'
218+ line: 137
219+ col: 33
220+ expected: '${test_file }:133:7'
221+ description: 'Go to struct definition from operator overload return type'
222+ },
223+ TestCase{
224+ name: 'struct_init_field_in_params_left'
225+ line: 138
226+ col: 23
227+ expected: '${test_file }:137:4'
228+ description: 'Go to param definition from struct init variable (left fn param)'
229+ },
230+ TestCase{
231+ name: 'struct_init_field_in_params_right'
232+ line: 138
233+ col: 31
234+ expected: '${test_file }:137:19'
235+ description: 'Go to param definition from struct init variable (right fn param)'
236+ },
237+ TestCase{
238+ name: 'field_selector_in_struct_init'
239+ line: 138
240+ col: 25
241+ expected: '${test_file }:134:1'
242+ description: 'Go to field definition from selector expression in struct init value (a.val)'
243+ },
244+ // test_function_params() tests
245+ TestCase{
246+ name: 'function_param_type'
247+ line: 141
248+ col: 24
249+ expected: '${test_file }:133:7'
250+ description: 'Go to struct definition from function parameter type'
251+ },
252+ // test_array_field_types() tests
253+ TestCase{
254+ name: 'array_elem_type_in_struct_field'
255+ line: 150
256+ col: 10
257+ expected: '${test_file }:145:7'
258+ description: 'Go to element type definition from array type in struct field ([]ArrayElemStruct)'
259+ },
260+ TestCase{
261+ name: 'fixed_array_elem_type_in_struct_field'
262+ line: 151
263+ col: 17
264+ expected: '${test_file }:145:7'
265+ description: 'Go to element type definition from fixed array type in struct field ([5]ArrayElemStruct)'
266+ },
201267]
202268
203269fn test_goto_definition () {
0 commit comments