=> supports pragmas & names (+ changed behavior) (#14200)
* => supports pragmas & names (+ changed behavior) (x, y: int) is now parsed as (x: int, y: int) instead of (x: auto, y: int) inside => and ->. * fix pragma check * fixes, use since & LHS of -> supports pragmas
This commit is contained in:
parent
b56432bd8a
commit
3e060cfb0a
6 changed files with 96 additions and 55 deletions
|
|
@ -1295,7 +1295,7 @@ macro genEnumStmt(typ: typedesc, argSym: typed, default: typed): untyped =
|
|||
foundFields.add fStr
|
||||
else:
|
||||
error("Ambiguous enums cannot be parsed, field " & $fStr &
|
||||
" appears multiple times!")
|
||||
" appears multiple times!", f)
|
||||
inc fNum
|
||||
# finally add else branch to raise or use default
|
||||
if default == nil:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue