Skip to content
Browse files

[Compiler] Test for issue #340.

  • Loading branch information...
1 parent 2003cb4 commit 03768d7371bf4ddb0c6473b17ff834d8d00b1f15 @VladD2 VladD2 committed May 7, 2012
Showing with 27 additions and 0 deletions.
  1. +27 −0 ncc/testsuite/positive/Issue-git-0340.n
View
27 ncc/testsuite/positive/Issue-git-0340.n
@@ -0,0 +1,27 @@
+using System;
+using System.Console;
+
+module Program
+{
+ Main() : void
+ {
+ WriteLine((typeof(Test).GetCustomAttributes(typeof(MyAtr), false)[0] :> MyAtr).prop);
+ }
+}
+
+[AttributeUsage(AttributeTargets.Class)]
+class MyAtr : Attribute
+{
+ public prop : object { get; set; }
+}
+
+[MyAtr(prop = "OK")]
+class Test
+{
+}
+
+/*
+BEGIN-OUTPUT
+OK
+END-OUTPUT
+*/

0 comments on commit 03768d7

Please sign in to comment.
Something went wrong with that request. Please try again.