-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Illegal storage access compiling call with nested ref/deref'd types #18079
Comments
what's the expected behavior by language design? |
Don't crash at compile-time and compile it properly. |
I can make this compile but am not sure about correctness, according to below, but it seems no other way construct proc(x: var X | ref X) fails to compile #4448
Originally posted by @Araq in #4448 (comment) |
after ecc8f61, it's still remain same error on gc refc, but compile and runs on orc |
That sounds not very fixed/closed. |
yeah, before my patch it's same error on orc, so I thought that fixed, I just re check these related 3 issues on refc, found now they turn to refc issues. |
…ref/deref (nim-lang#20738) * add test case * refactoring transformAddrDeref and fix nim-lang#18079 * fix jsgen
…ref/deref (nim-lang#20738) * add test case * refactoring transformAddrDeref and fix nim-lang#18079 * fix jsgen
Calling a function with nested layers of object construction, each of which constructs a reference object then dereferences it, results in
SIGSEGV
at compile time with Nim versions 1.2.12, 1.4.2, and current git head.Example
Current Output
Expected Output
Not a segfault.
The text was updated successfully, but these errors were encountered: