Skip to content

Commit

Permalink
chore: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Jun 5, 2023
1 parent 51935aa commit f3a8104
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
28 changes: 19 additions & 9 deletions corpus/declarations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ func g1[T, U any, V interface{}, W Foo[Bar[T]]](a Foo[T]) {}
func g1[T, U any, V interface{}, W Foo[Bar[T]]](a Foo[T]) {}
func g2(a foo.bar[int]) {}
func f[A int|string, B ~int, C ~int|~string]()
func f2(a File, b, c, d Thing) int {}

--------------------------------------------------------------------------------

Expand All @@ -265,10 +266,8 @@ func f[A int|string, B ~int, C ~int|~string]()
(identifier)
(type_identifier))
(parameter_declaration
(type_identifier))
(parameter_declaration
(type_identifier))
(parameter_declaration
(identifier)
(identifier)
(identifier)
(type_identifier)))
(type_identifier)
Expand Down Expand Up @@ -305,9 +304,8 @@ func f[A int|string, B ~int, C ~int|~string]()
(function_declaration
(identifier)
(type_parameter_list
(parameter_declaration
(type_identifier))
(parameter_declaration
(identifier)
(identifier)
(type_identifier))
(parameter_declaration
Expand All @@ -334,8 +332,7 @@ func f[A int|string, B ~int, C ~int|~string]()
(identifier)
(type_parameter_list
(parameter_declaration
(type_identifier))
(parameter_declaration
(identifier)
(identifier)
(type_identifier))
(parameter_declaration
Expand Down Expand Up @@ -389,7 +386,20 @@ func f[A int|string, B ~int, C ~int|~string]()
(type_identifier))
(negated_type
(type_identifier)))))
(parameter_list)))
(parameter_list))
(function_declaration
(identifier)
(parameter_list
(parameter_declaration
(identifier)
(type_identifier))
(parameter_declaration
(identifier)
(identifier)
(identifier)
(type_identifier)))
(type_identifier)
(block)))

================================================================================
Single-line function declarations
Expand Down
3 changes: 1 addition & 2 deletions corpus/types.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ type g2[T, U any, V interface{}, W Foo[Bar[T]]] struct {}
(type_identifier)
(type_parameter_list
(parameter_declaration
(type_identifier))
(parameter_declaration
(identifier)
(identifier)
(type_identifier))
(parameter_declaration
Expand Down

0 comments on commit f3a8104

Please sign in to comment.