-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label
Milestone
Description
The following code is valid in Scala 3.3.1
trait A:
extension (x: Int) def foo: Int
But it seems to be not covered by the ebnf grammar:
Extension ::= ‘extension’ [DefTypeParamClause] {UsingParamClause}
‘(’ DefTermParam ‘)’ {UsingParamClause} ExtMethods
ExtMethods ::= ExtMethod | [nl] <<< ExtMethod {semi ExtMethod} >>>
ExtMethod ::= {Annotation [nl]} {Modifier} ‘def’ DefDef
| Export
DefDef ::= DefSig [‘:’ Type] ‘=’ Expr
| ‘this’ TypelessClauses [DefImplicitClause] ‘=’ ConstrExpr
DefDef
requires a function body to be defined (unlike DefDcl
)
Metadata
Metadata
Assignees
Labels
itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label