Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler error caused by quote do: else #11175

zestyr opened this issue May 4, 2019 · 0 comments


None yet
2 participants
Copy link

commented May 4, 2019

I stumbled upon an internal error while playing around with macros. It seems it only happens when doing else:, as if and block both cause the "complex statement requires indentation" error.


import macros

macro test(): untyped =
  quote do: else: discard

Current Output

Error: internal error: (filename: "semexprs.nim", line: 1893, column: 17)
No stack traceback available
To create a stacktrace, rerun compilation with ./koch temp c <file>

Expected Output

macro.nim(4, 13) Error: complex statement requires indentation

Additional Information

$ nim -v
Nim Compiler Version 0.19.9 [Linux: amd64]
Compiled at 2019-05-02
Copyright (c) 2006-2019 by Andreas Rumpf

active boot switches: -d:release

The error is triggered by this line:

internalAssert c.config, n.len == 2 or n.len == 3

@krux02 krux02 self-assigned this May 4, 2019

@Araq Araq closed this in 094d71c May 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.