|
[#1217] |
project: specification |
priority: low |
category: bug |
|
submitter |
assigned to |
status |
date submitted |
|
Nikolay |
Martin |
noise |
2007-07-17 10:21:41.0 |
subject |
[contrib #691] Confusing pattern grammar |
code |
From page 144 of ScalaReference
Pattern2 ::= varid [‘@’ Pattern3]
| Pattern3
Pattern3 ::= SimplePattern
| SimplePattern { id [nl] SimplePattern }
SimplePattern ::= ‘_’
| varid
| Literal
| StableId
| StableId ‘(’ [Patterns [‘,’]] ‘)’
| StableId ‘(’ [Patterns ‘,’] ‘_’ ‘*’ ‘)’
| ‘(’ [Patterns [‘,’]] ‘)’
| XmlPattern
|
what happened |
As stated, the grammar means a Pattern which is a varid can be either a Pattern2 or a SimplePattern.
|
what expected |
Either remove optional tag of " '@' Pattern3 " in Pattern2, or remove varid from SimplePattern |
[back to overview] |