You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I agree this is a problem, there is a workaround. Something like this:
enum node = _node; // does this syntax still work?
type _node = { value: i32, next: *node };
ought to work. However, because this is a native linked list, it might not... this is because we get alignment of enums totally wrong. I'm actually not sure what's the best bug representing this issue, but #1535 is certainly a symptom.
To clarify, the enum node = _node syntax was (maybe still is) shorthand for:
enum node {
node(_node)
}
Type recursion is permitted through an enum. Single variant enums are supposed to be represented without any discriminant, so this ought to be exactly equivalent to _node. Except that we get the alignment wrong, so it's not exactly equivalent in practice.
This hits the recursive type error, so next has to be *u8 or something else.
The text was updated successfully, but these errors were encountered: