Bug 7274 – Cannot use property function call in pragma declaration/statement

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-11T19:56:00Z
Last change time
2012-10-07T11:52:46Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2012-01-11T19:56:30Z
Property function call in pragma doesn't work well. Example: ---- @property foo(){ return "test"; } @property bar(){ return "kernel32.lib"; } pragma(msg, "decl: ", foo); // print "decl: foo", not "decl: test" pragma(lib, bar); // Error: pragma lib string expected for library name, not 'bar' void main() { pragma(msg, "stmt: ", foo); // print "stmt: foo", not "stmt: test" //pragma(lib, bar); // Error: pragma(lib) not allowed as statement }
Comment #1 by k.hara.pg — 2012-01-11T22:29:25Z
Comment #2 by yebblies — 2012-10-07T11:52:46Z