mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
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:
parent
893b0abfa8
commit
df5ba24ef9
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ Type =
|
||||||
SimpleType ['|' Type] |
|
SimpleType ['|' Type] |
|
||||||
SimpleType ['&' Type]
|
SimpleType ['&' Type]
|
||||||
|
|
||||||
GenericTypeList = NAME ['...'] {',' NAME ['...']}
|
GenericTypeList = NAME [',' GenericTypeList] | NAME '...' {',' NAME '...'}
|
||||||
TypeList = Type [',' TypeList] | '...' Type
|
TypeList = Type [',' TypeList] | '...' Type
|
||||||
ReturnType = Type | '(' TypeList ')'
|
ReturnType = Type | '(' TypeList ')'
|
||||||
TableIndexer = '[' Type ']' ':' Type
|
TableIndexer = '[' Type ']' ':' Type
|
||||||
|
|
Loading…
Add table
Reference in a new issue