[Issue 21078] static if(is(T IDENT)) introduces IDENT beyond static if's scpe
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 21 18:23:42 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=21078
Nick Treleaven <nick at geany.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nick at geany.org
--- Comment #4 from Nick Treleaven <nick at geany.org> ---
This was stated as intended behaviour but I can't find the invalid bug now. The
reason is that an identifier can't be added to an existing scope only for part
of the remaining scope. If there are no braces for the static if, and if the
identifier is valid inside the static if, then it must be valid after it too,
as they share a single scope.
--
More information about the Digitalmars-d-bugs
mailing list