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

C++ codegen error when iterating in finally block in topmost scope #5549

Closed
endragor opened this issue Mar 16, 2017 · 0 comments

Comments

Projects
None yet
3 participants
@endragor
Copy link
Contributor

commented Mar 16, 2017

Sample:

var strs: seq[string] = @[]

try:
  discard
finally:
  for s in strs:
    discard

Error when compiling with C++ backend:

sample.cpp:271:16: error: redefinition of 's_Pjq3d39aCwDUfylPicy2fJQ'
NimStringDesc* s_Pjq3d39aCwDUfylPicy2fJQ;
               ^
sample.cpp:269:16: note: previous definition is here
NimStringDesc* s_Pjq3d39aCwDUfylPicy2fJQ;
               ^
1 error generated.

Git hash: 13ba0b5

@endragor endragor changed the title C++ codegen error when iterating in finally block C++ codegen error when iterating in finally block in topmost scope Mar 16, 2017

@krux02 krux02 self-assigned this Oct 25, 2018

krux02 added a commit to krux02/Nim that referenced this issue Oct 25, 2018

@Araq Araq closed this in 432a4d1 Oct 30, 2018

krux02 added a commit to krux02/Nim that referenced this issue Oct 30, 2018

narimiran added a commit to narimiran/Nim that referenced this issue Oct 31, 2018

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.