http://d.puremagic.com/issues/show_bug.cgi?id=11079
Summary: Attributes for template functions should be visible
when used with traits
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Andrej Mitrovic <[email protected]> 2013-09-20
14:36:56 PDT ---
-----
interface A
{
static void foo(B obj)
{
// ok
static assert(__traits(isStaticFunction,
__traits(getMember, obj, "foo")));
}
static void bar(T)(T obj)
{
// fails
static assert(__traits(isStaticFunction,
__traits(getMember, obj, "bar")));
}
}
class B : A
{
}
void main()
{
B b = new B;
b.foo(b);
b.bar(b);
}
-----
I think this is the same symptom as in
http://d.puremagic.com/issues/show_bug.cgi?id=194, and particularly Walter's
comment http://d.puremagic.com/issues/show_bug.cgi?id=194#c1.
However, the templated function 'bar' is static regardless of what it's
instantiated with, so the traits should likely be able to work with it.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------