Fix correctness of generic type list

Previously, the definition permitted `type Foo<T..., U>`, but generic types must come before generic type packs.
This grammar now represents this better
This commit is contained in:
JohnnyMorganz 2022-01-17 13:31:47 +00:00
parent 893b0abfa8
commit df5ba24ef9

View file

@ -73,7 +73,7 @@ Type =
SimpleType ['|' Type] |
SimpleType ['&' Type]
GenericTypeList = NAME ['...'] {',' NAME ['...']}
GenericTypeList = NAME [',' GenericTypeList] | NAME '...' {',' NAME '...'}
TypeList = Type [',' TypeList] | '...' Type
ReturnType = Type | '(' TypeList ')'
TableIndexer = '[' Type ']' ':' Type