[Issue 2774] New: Functions-as-properties makes it impossible to get the .mangleof a function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 31 18:04:53 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2774
Summary: Functions-as-properties makes it impossible to get the
.mangleof a function
Product: D
Version: 1.041
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: jarrett.billingsley at gmail.com
class A{}
pragma(msg, A.mangleof); // prints "C5dtest1A" as expected
void foo() {}
pragma(msg, foo.mangleof); // prints "v" since typeof(foo) is the same as
typeof(foo())
pragma(msg, (&foo).mangleof); // prints PFZv, symbol info lost
template T(alias f)
{
pragma(msg, f.mangleof); // prints "v"
const T = "dummy";
}
pragma(msg, T!(foo));
It'd be really nice to get the mangle of functions. It'd make it possible to
determine whether a function is static or not, as well as the ref-ness of its
params. But DMD currently turns any reference to the function into a call to
it as soon as possible, making it impossible to do so.
--
More information about the Digitalmars-d-bugs
mailing list