Bug 8485 – IsExpression referencing a deprecated symbol evaluates to different values depending on -d switch

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-07-31T05:33:45Z
Last change time
2019-10-10T11:31:36Z
Keywords
accepts-invalid
Assigned to
No Owner
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2012-07-31T05:33:45Z
DMD 2.059 accepts the following code: deprecated int x; void main(){ static assert(!is(typeof(x))); } It should be rejected, or symbol deprecation and the -d switch can change the meaning of valid code.
Comment #1 by smjg — 2013-03-16T18:29:59Z
See also issue 7482.
Comment #2 by razvan.nitu1305 — 2019-10-10T11:31:36Z
Git master rejects this code. Closing as fixed.