digitalmars.D.bugs - [Issue 11079] New: Attributes for template functions should be visible when used with traits
- d-bugmail puremagic.com (48/48) Sep 20 2013 http://d.puremagic.com/issues/show_bug.cgi?id=11079
- d-bugmail puremagic.com (6/6) Sep 20 2013 http://d.puremagic.com/issues/show_bug.cgi?id=11079
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: nobody puremagic.com ReportedBy: andrej.mitrovich gmail.com 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: -------
Sep 20 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11079 14:37:25 PDT --- Issue was found by CounterPillow from IRC, filing on his behalf. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 20 2013