From df5ba24ef9e9f47adaf6845dce37cffe9ef7ef8f Mon Sep 17 00:00:00 2001 From: JohnnyMorganz Date: Mon, 17 Jan 2022 13:31:47 +0000 Subject: [PATCH] Fix correctness of generic type list Previously, the definition permitted `type Foo`, but generic types must come before generic type packs. This grammar now represents this better --- docs/_pages/grammar.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_pages/grammar.md b/docs/_pages/grammar.md index c369eda9..14301c9d 100644 --- a/docs/_pages/grammar.md +++ b/docs/_pages/grammar.md @@ -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