Bug 11668 – "is" fails to catch errors in functions

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-03T02:49:54Z
Last change time
2020-05-26T06:14:55Z
Assigned to
No Owner
Creator
Max Samukha

Comments

Comment #0 by samukha — 2013-12-03T02:49:54Z
Current spec: "Type is the type being tested. It must be syntactically correct, but it need not be semantically correct.". template foo() { static assert(false); // 1 void bar() { static assert(false); // 2 } } enum x = is(foo!()); ---- The original test case compiles without errors. If (1) is commented out: Error: static assert (false) is false If (2) is commented out, there is no error.
Comment #1 by maxsamukha — 2020-05-26T06:14:55Z
This seems to have been fixed.