Browse files

fix Issue 9178 - UDA: getAttributes does not play well with tupleof

  • Loading branch information...
1 parent 1f6e815 commit 12a54af800ca57456066825ef7a41c5151efbae9 @9rnsr 9rnsr committed Jan 18, 2013
Showing with 12 additions and 0 deletions.
  1. +12 −0 test/runnable/uda.d
View
12 test/runnable/uda.d
@@ -251,6 +251,17 @@ void test12()
}
/************************************************/
+// 9178
+
+void test9178()
+{
+ static class Foo { @(1) int a; }
+
+ Foo foo = new Foo;
+ static assert(__traits(getAttributes, foo.tupleof[0])[0] == 1);
+}
+
+/************************************************/
int main()
{
@@ -266,6 +277,7 @@ int main()
test10();
test11();
test12();
+ test9178();
printf("Success\n");
return 0;

0 comments on commit 12a54af

Please sign in to comment.