[Issue 24482] Recursive alias out of order fails to compile with a misleading error message.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Apr 4 22:51:56 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24482
--- Comment #2 from basile-z <b2.temp at gmx.com> ---
Moving decls does not solve anything, just try
```
struct Array(E) { E e;}
struct Enum(T) {T t;}
struct Object {NodeArray values;}
alias NodeArray = Array!Node;
alias Node = Enum!(Object);
```
The point is that at some point you must know the size of a member. When the
member is a pointer you can guess the size without knowing the actual pointee
type size. Might be zero, might be 3 Billions, but in fine it's a pointer so
let's see that later ;)
--
More information about the Digitalmars-d-bugs
mailing list