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

Crash related to nested closure iterators #11321

Open
dawkot opened this issue May 24, 2019 · 0 comments
Open

Crash related to nested closure iterators #11321

dawkot opened this issue May 24, 2019 · 0 comments

Comments

@dawkot
Copy link

dawkot commented May 24, 2019

iterator foo {.closure.} =
  discard

iterator bar {.closure.} =
  var x = iterator =
    var it = foo # crash
    # var it = iterator = discard # compiles

var x = bar
Error: execution of an external compiler program
'gcc.exe -c  -w -mno-ms-bitfields  -IC:\Users\dawkot\.choosenim\toolchains\nim-#devel\lib -ID:\Nim
-o C:\Users\dawkot\nimcache\test_d\test.c.o C:\Users\dawkot\nimcache\test_d\test.c' failed with exit code: 1

C:\Users\dawkot\nimcache\test_d\test.c: In function 'colonanonymous__9aWAU3lwPAOIcoVcbcTZVUg_2':
C:\Users\dawkot\nimcache\test_d\test.c:409:78: error: request for member 'ClE_0' in something not a structure or union
    asgnRef((void**) (&(*colonenvP_).it1.ClE_0), foo_9aWAU3lwPAOIcoVcbcTZVUg_3.ClE_0);
                                                                              ^
C:\Users\dawkot\nimcache\test_d\test.c:410:59: error: request for member 'ClP_0' in something not a structure or union
    (*colonenvP_).it1.ClP_0 = foo_9aWAU3lwPAOIcoVcbcTZVUg_3.ClP_0;
                                                           ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants