Merge pull request #4327 from vkargov/vk-abcremedy
[mono.git] / mcs / tests / test-637.cs
1 using System;
2
3 struct S {}
4
5 class A : Attribute
6 {
7         public A ()
8         {
9         }
10         
11         public A (object value)
12         {
13                 Value = (Type) value;
14         }
15         
16         public Type Value { get; set; }
17 }
18
19 [A (Value = typeof (S*))]
20 class TestProp
21 {
22 }
23
24 [A (typeof (ushort**))]
25 public class Test
26 {
27         public static int Main ()
28         {
29                 A a = (A)typeof (Test).GetCustomAttributes (false)[0];
30                 if (a.Value != typeof (ushort**))
31                         return 1;
32
33                 a = (A)typeof (TestProp).GetCustomAttributes (false)[0];
34                 if (a.Value != typeof (S*))
35                         return 2;
36                 
37                 return 0;
38         }
39 }