[Issue 23760] Error: unknown

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 7 11:48:15 UTC 2023


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

--- Comment #2 from RazvanN <razvan.nitu1305 at gmail.com> ---
The problem seems to stem from the fact that the first time `State` is analyzed
as a type is when the type is requested via `typeof`. In that context, semantic
analysis is done with gagged errors, therefore you don't get the user friendly
error message. Next time it is analyzed is when traits(overloads) is requested
on `state`. By that time the compiler just sees that `state` has an erroneous
type but doesn't know the reason.

--


More information about the Digitalmars-d-bugs mailing list