Bug 7174 – Cannot use property function call as static if condition

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-12-27T17:51:00Z
Last change time
2014-05-06T19:11:40Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2011-12-27T17:51:14Z
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.
Comment #1 by k.hara.pg — 2012-01-02T01:22:34Z
Comment #2 by issues.dlang — 2012-07-10T18:02:49Z
Still in dmd 2.060HEAD (though, since the pull request hasn't been merged, that's not exactly surprising).
Comment #3 by yebblies — 2012-10-07T11:52:28Z
Comment #4 by k.hara.pg — 2012-10-07T12:09:45Z
*** Issue 8767 has been marked as a duplicate of this issue. ***
Comment #5 by schveiguy — 2014-05-06T19:11:40Z
*** Issue 8767 has been marked as a duplicate of this issue. ***