[Issue 17446] New: Static-assert passes/fails based on what follows
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat May 27 05:03:12 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17446
Issue ID: 17446
Summary: Static-assert passes/fails based on what follows
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: dario.schiavon at gmail.com
import std.traits : isAssignable;
struct MyStruct
{
static assert(isAssignable!MyStruct);
// fails, but passes if the following line is removed
static if (isAssignable!MyStruct) {}
}
The assertion fails (wrongly IMO), but passes if the following static-if is
removed.
Using DMD32 v2.074.0 or LDC2 v1.1.1 (based on DMD v2.071.2).
See also https://issues.dlang.org/show_bug.cgi?id=17445
--
More information about the Digitalmars-d-bugs
mailing list