D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 11668 - "is" fails to catch errors in functions
Summary: "is" fails to catch errors in functions
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-03 02:49 UTC by Max Samukha
Modified: 2020-05-26 06:14 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Max Samukha 2013-12-03 02:49:54 UTC
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 Max Samukha 2020-05-26 06:14:55 UTC
This seems to have been fixed.