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.