-
Notifications
You must be signed in to change notification settings - Fork 243
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
Selfhost Compiler Crashed with Segmentation Fault printing a LinkedList #973
Comments
It is basically this line: |
Ah interesting, since |
Basically the same as with recursive enums which have to be boxed (aka class) |
So the compiler should reject code in which a value type references itself directly, as in:
and indirectly through other value types such as tuples, arrays or other structs (e. g.
whilst allowing non-value types such as pointers to reference it safely? |
only if it is a struct, it should work for classes. |
i.e. this should be ok:
|
WHF :) On the most recent
main
branch (commit9c52bee6
) I tried to compile the following progam:and the compiler (not the resulting program) crashed with a Segmentation Fault.|
Steps I took:
The Rust-based compiler doesn't crash and produces some Cpp which clang then rejects with
error: invalid application of 'sizeof' to an incomplete type 'Jakt::LinkedList'
The text was updated successfully, but these errors were encountered: