[Issue 7274] New: Cannot use property function call in pragma declaration/statement
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 11 19:56:31 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7274
Summary: Cannot use property function call in pragma
declaration/statement
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2012-01-11 19:56:30 PST ---
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
}
--
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