www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7174] New: Cannot use property function call as static if condition

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: timon.gehr gmx.ch


--- Comment #0 from timon.gehr 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: -------
Dec 27 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7174


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch, rejects-valid
           Platform|Other                       |All


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2012-01-02 01:22:34 PST ---
https://github.com/D-Programming-Language/dmd/pull/599

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