[Issue 23598] Another nasty forward reference bug

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 19 09:09:14 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23598

--- Comment #6 from Walter Bright <bugzilla at digitalmars.com> ---
What seems to be happening is the first time it goes through `template sort`,
it cannot set `aliasdecl` because the two `alias sort` assignments are hidden
behind conditional compilation.

Hence `aliasdecl` is null.

So, in semantic for `struct String` it encounters `SortedItems.length`. The
`aliasdecl` is null, so `SortedItems` becomes `sort!(...)` which becomes `void`
and there is no `length` for `void`.

--


More information about the Digitalmars-d-bugs mailing list