Open ericlippert opened 7 years ago
Hack supports an optional "where" clause on a function definition; it comes last (after the return type, before the body.)
The grammar is
where-clause: where constraint-list constraint-list: constraint constraint-list , constraint constraint: type-specifier constraint-operator type-specifier constraint-operator: = as super
Note that a trailing comma is not accepted in a constraint list.
The grammar should be amended to include these productions, and the description of a function header should describe the semantics of the clause.
Hack supports an optional "where" clause on a function definition; it comes last (after the return type, before the body.)
The grammar is
Note that a trailing comma is not accepted in a constraint list.
The grammar should be amended to include these productions, and the description of a function header should describe the semantics of the clause.