docs.scala-lang icon indicating copy to clipboard operation
docs.scala-lang copied to clipboard

Missing production rule

Open danecek opened this issue 3 years ago • 3 comments

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

danecek avatar Oct 10 '22 15:10 danecek

I think it is a typo and it should be HkTypeParamClause, but TypeArgs is listed on the page as

TypeArgs          ::=  ‘[’ Types ‘]’ ;

bishabosha avatar Oct 11 '22 07:10 bishabosha

I am sorry for my mistake. Probably I exchanged SimpleType1 for TypeArgs when I paste-copied from the rule to the comment.

danecek avatar Oct 11 '22 11:10 danecek

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

bishabosha avatar Oct 11 '22 12:10 bishabosha