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 pragma for var pragmas inside templates #89

Open
timotheecour opened this issue Apr 4, 2020 · 0 comments
Open

invalid pragma for var pragmas inside templates #89

timotheecour opened this issue Apr 4, 2020 · 0 comments

Comments

@timotheecour
Copy link
Owner

timotheecour commented Apr 4, 2020

invalid pragma for var pragmas inside templates

Example

template foo(lhs, typ, expr) =
  let lhs = expr
proc fun1()=
  let a {.foo.} = 1
template fun2()=
  let a {.foo.} = 1
fun1() # ok
fun2() # BUG

Current Output

Error: invalid pragma: foo

Expected Output

works

Additional Information

nim 7e83adf
related: #129
=> template/macro pragmas don't work in templates (eg: byaddr, since etc) · Issue #15920 · nim-lang/Nim

workaround:

let a {.foo.} = 1
=>
foo(a, nil, 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant