[Issue 7174] New: Cannot use property function call as static if condition

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 27 17:51:18 PST 2011


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

           Summary: Cannot use property function call as static if
                    condition
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at gmx.ch 2011-12-27 17:51:14 PST ---
Tested with DMD 2.057:

@property bool foo(){return true;}
static if(foo){}

Error: expression foo is not constant or does not evaluate to a bool

The code should compile.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list