=> 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:
hlaaftana 2020-05-03 11:22:49 +03:00 • committed by GitHub
commit 3e060cfb0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 96 additions and 55 deletions

View file

@ -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: