[Issue 22865] __traits(compiles) affects inferrence of attributes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 10 12:09:31 UTC 2022


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

--- Comment #2 from Basile-z <b2.temp at gmx.com> ---
The basic problem is that the function scope is used to evaluate the enum value
while we are more in a static scope that can see static things in parent
scopes.

There is no system for this in the D frontend now. We can only known if
something static is evaluated (SCOPE.ctfe) or also if we are in a traits
compile (SCOPE.compile).

That fix is consequently not good but it does not break the test suite.

There is something very conceptual about semantics on if the cast should be
allowed or not in "particular contexts".

--


More information about the Digitalmars-d-bugs mailing list