[Issue 9178] New: UDA: getAttributes does not play well with topleof

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 18 09:18:58 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=9178

           Summary: UDA: getAttributes does not play well with topleof
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: puneet at coverify.org


--- Comment #0 from Puneet Goel <puneet at coverify.org> 2012-12-18 09:18:57 PST ---
http://forum.dlang.org/thread/mailman.2763.1355745364.5162.digitalmars-d@puremagic.com

I am trying to get the user defined attributes for all the fields of a class. I
am getting the following error:

  Error: first argument is not a symbol
  tuple(false)


// test code

template Tuple(T...) {
  alias T Tuple;
}

enum Bar;
class Foo {
  @Bar int a;
}

void main()
{
  Foo foo = new Foo;
  alias Tuple!(__traits(getAttributes, foo.tupleof[0])) tp;
  pragma(msg, tp);
}

-- 
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