www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13601] New: static if (__ctfe) should emit warning

https://issues.dlang.org/show_bug.cgi?id=13601

          Issue ID: 13601
           Summary: static if (__ctfe) should emit warning
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: ketmar ketmar.no-ip.org

Created attachment 1445
  --> https://issues.dlang.org/attachment.cgi?id=1445&action=edit
warn on `static if (__ctfe)`

there is no much sense in doing `static if (__ctfe) …`, and this is common
mistake. even seasoned D developers aren't prone to it. so i think that
compiler should warn us about it. i wrote somewhat hacky but working code for
this.

--
Oct 10 2014