`typeof` forward ref fails whereas explicit type passes
user1234
user1234 at 12.de
Mon Apr 27 16:41:12 UTC 2026
On Monday, 27 April 2026 at 08:24:45 UTC, user1234 wrote:
> Just noticed a bug at Odin GH and it turns out D is affected as
> well:
>
> [...]
here is another similar case
```d
OK ok;
struct OK
{
TOK* next;
}
alias TOK = typeof(ok);
// ---
alias TNG = typeof(ng);
NG ng;
struct NG
{
TNG* next;
}
```
> temp.d(11,13): Error: circular `typeof` definition
whereas OK is just well huh... "ok".
More information about the Digitalmars-d-learn
mailing list