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

Compiler crash when initializing table with module name #9319

Closed
Wh1teDuke opened this issue Oct 11, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@Wh1teDuke
Copy link
Contributor

commented Oct 11, 2018

Test

import Foo, tables
discard initTable[int, Foo]()

Result
SIGSEGV: Illegal storage access. (Attempt to read from nil?)


>nim -v
Nim Compiler Version 0.19.1 [Linux: i386]
Compiled at 2018-10-11
Copyright (c) 2006-2018 by Andreas Rumpf

git hash: 027a11d7c85ffc990dc5b41f1c1e2b799e77ba36
active boot switches: -d:release
@LemonBoy

This comment has been minimized.

Copy link
Contributor

commented Oct 11, 2018

Oh well, the usual exported-type-with-same-name-as-module shitshow... The Foo you see there refers to the module and not to the type.

@Wh1teDuke

This comment has been minimized.

Copy link
Contributor Author

commented Nov 8, 2018

Forgot to say, the best workaround is to import using alias:

import Foo as F, tables
discard initTable[int, Foo]()

krux02 added a commit to krux02/Nim that referenced this issue Nov 8, 2018

@Araq Araq closed this in cba86a9 Nov 8, 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.