[Issue 992] New: CTFE Failure with static if

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 21 15:38:42 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=992

           Summary: CTFE Failure with static if
           Product: D
           Version: 1.006
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: webmaster at villagersonline.com


The following code fails with dmd.1.006:
  bool isWhitespace(char c) {
    return true;
  }
  static if(isWhitespace('c'))
    int x;

with the messages
  foo.d(4): Error: expression (isWhitespace)('c') is not constant or does not
evaluate to a bool


-- 



More information about the Digitalmars-d-bugs mailing list