Merge pull request #1057 from lextm/master
[mono.git] / mcs / tests / test-primary-ctor-05.cs
1 // Compiler options: -warnaserror
2
3 using System;
4 using System.Reflection;
5
6 class A : Attribute
7 {
8 }
9
10 class X ([field:A] int value)
11 {
12         public int f = value;
13
14         public int P {
15                 get {
16                         return value;
17                 }
18         }
19
20         public static int Main ()
21         {
22                 var attr = (A)typeof (X).GetField("value", BindingFlags.NonPublic | BindingFlags.Instance).GetCustomAttribute (typeof (A));
23                 if (attr == null)
24                         return 1;
25
26                 return 0;
27         }
28 }