docs.scala-lang
docs.scala-lang copied to clipboard
Missing production rule
Missing production rule for TypeParamClause and TypeArgs in https://docs.scala-lang.org/scala3/reference/syntax.html
TypeDcl ::= id [TypeParamClause] {FunParamClause} TypeBounds [‘=’ Type] ; SimpleType ::= SimpleLiteral | ‘?’ TypeBounds | id | Singleton ‘.’ id | Singleton ‘.’ ‘type’ | ‘(’ Types ‘)’ | Refinement | ‘$’ ‘{’ Block ‘}’ -- unless inside quoted pattern | ‘$’ ‘{’ Pattern ‘}’ -- only inside quoted pattern | SimpleType1 TypeArgs
I think it is a typo and it should be HkTypeParamClause, but TypeArgs is listed on the page as
TypeArgs ::= ‘[’ Types ‘]’ ;
I am sorry for my mistake. Probably I exchanged SimpleType1 for TypeArgs when I paste-copied from the rule to the comment.
I opened https://github.com/lampepfl/dotty/issues/16166 to track this, seeing as that is where the source for the scala 3 reference is