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

vm string literals do not work when generated by a macro #12670

Closed
krux02 opened this issue Nov 15, 2019 · 0 comments
Closed

vm string literals do not work when generated by a macro #12670

krux02 opened this issue Nov 15, 2019 · 0 comments
Labels
Regression Showstopper VM see also `const` label

Comments

@krux02
Copy link
Contributor

krux02 commented Nov 15, 2019

Example

macro fooImpl(arg: untyped) =
  result = quote do:
    `arg`

proc foo(): string {.compileTime.} =
  fooImpl:
    result = "foo"
    result.addInt 4

static:
   echo foo()
   echo foo()
   echo foo()

Current Output

foo4
foo44
foo444

Expected Output

foo4
foo4
foo4

Additional Information

$ nim -v
Nim Compiler Version 1.1.1 [Linux: amd64]
Compiled at 2019-11-14
Copyright (c) 2006-2019 by Andreas Rumpf

git hash: e69a69852b1028017139114a2444de83630c1505
active boot switches: -d:danger
@krux02 krux02 added Regression VM see also `const` label labels Nov 15, 2019
krux02 added a commit to krux02/opengl-sandbox that referenced this issue Nov 16, 2019
Araq added a commit that referenced this issue Nov 20, 2019
@Araq Araq closed this as completed in 78e02d1 Nov 20, 2019
narimiran pushed a commit to narimiran/Nim that referenced this issue Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regression Showstopper VM see also `const` label
Projects
None yet
Development

No branches or pull requests

2 participants