Bug 14273 – Predicates for static assert pass depending on order of asserts

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-03-10T21:34:47Z
Last change time
2024-12-13T18:41:10Z
Assigned to
No Owner
Creator
Meta
Moved to GitHub: dmd#18957 →

Comments

Comment #0 by monkeyworks12 — 2015-03-10T21:34:47Z
template canBeAlias(T...) if (T.length == 1) { enum canBeAlias = is(typeof({ alias _ = T[0]; })); } static assert(canBeAlias!(canBeAlias!canBeAlias)); //Error: static assert (!true) is false static assert(!canBeAlias!true); If we switch the order: static assert(!canBeAlias!true); //Error: static assert (canBeAlias!(true)) is false static assert(canBeAlias!(canBeAlias!canBeAlias));
Comment #1 by robert.schadek — 2024-12-13T18:41:10Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18957 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB