fixes #18847 [backport] (#18870)

This commit is contained in:
Andreas Rumpf 2021-09-20 09:09:53 +02:00 • committed by GitHub
commit c56ba3f06a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -1824,8 +1824,9 @@ proc parseRoutine(p: var Parser, kind: TNodeKind): PNode =
# => moves comment `foo` to `fn`
result.comment = body[0].comment
body[0].comment = ""
else:
assert false, p.lex.config$body.info # avoids hard to track bugs, fail early.
#else:
# assert false, p.lex.config$body.info # avoids hard to track bugs, fail early.
# Yeah, that worked so well. There IS a bug in this logic, now what?
proc newCommentStmt(p: var Parser): PNode =
#| commentStmt = COMMENT