August 12 [Issue 24699] New: [REG2.108] No short-circuit evaluation of mixing template bool argument | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24699 Issue ID: 24699 Summary: [REG2.108] No short-circuit evaluation of mixing template bool argument Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: johanengelen@weka.io Testcase: ``` mixin template StaticAssertAt(bool cond) { static if (!cond) { pragma(msg, "asd"); } } template foo(T) { enum foo = false; mixin StaticAssertAt!(true || T.tupleof.length == 1); } enum a = foo!ubyte; ``` The test case compiles with 2.107 but not with 2.108. The short-circuit evaluation of || is not happening, thus 2.108 errors with: Error: no property `tupleof` for type `ubyte` https://d.godbolt.org/z/fYYYfhq95 -- |
Copyright © 1999-2021 by the D Language Foundation