-
-
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
Compiler crashes on ptr void #6456
Labels
Comments
@obadz yeah, it shouldn't crash, but you can't do "ptr void" type
a* = object
b*: int
c*: pointer
proc main() =
var x = a(b: 4)
let a = "hello"
x.c = cast[pointer](a)
echo cast[int64](x.c) # Pointer as int :)
echo cast[string](x.c)
main() You can use any types you want here (well, if they're references) |
@Yardanico, It took me a while to realize this was even causing the error because of the lack of error message / line number. Also I didn't put this I replaced by |
ghost
added
the
Compiler Crash
label
Oct 15, 2017
Fixed in #8127 |
same crash on import sharedlist
var s:SharedList[void]
s.init() obvs low priority, just sayin. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The Nim compiler seems to crash when objects have a
ptr void
member and neither give an explicit error message nor a line number. For example:Yields:
(No tracebacks provided)
Tested with nim version 0.17.0.
The text was updated successfully, but these errors were encountered: