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

"invalid indentation" when assigning macro with code block to const #10861

Closed
zevv opened this issue Mar 18, 2019 · 1 comment

Comments

Projects
None yet
3 participants
@zevv
Copy link
Contributor

commented Mar 18, 2019

The following does not compile. Assigning to a let has different behaviour then assigning to a const

macro foo(a: untyped): untyped = 
  a             

let c1 = foo:
  1 + 1

const c2 = foo:
  1 + 1

Message:

t.nim(13, 14) Error: invalid indentation
Nim Compiler Version 0.19.9 [Linux: amd64]
Compiled at 2019-03-09
Copyright (c) 2006-2019 by Andreas Rumpf

git hash: b9f8528db675927aacc6443ae3a363711bb41945
active boot switches: -d:release

@mratsim mratsim added the Parser label Mar 19, 2019

@cooldome cooldome self-assigned this Mar 20, 2019

@cooldome

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

IMO, I know how fix this one

cooldome added a commit to cooldome/Nim that referenced this issue Mar 20, 2019

@Araq Araq closed this in 28a926c Mar 21, 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.