[interp] Remove unreachable code (#12411)
[mono-project.git] / mono / tests / cattr-field.cs
blobb1517129bbd6fb18e26e7d6648d60349b711a3f9
1 using System;
3 [My(val=2,sval="str",bb=0,S="Buh",P=4)]
4 class T {
5 static int Main() {
6 object[] a = Attribute.GetCustomAttributes (typeof (T), true);
7 My attr = (My)a [0];
8 if (attr.val != 2)
9 return 1;
10 if (attr.P != 4)
11 return 2;
12 if (attr.S != "Buh")
13 return 3;
14 return 0;
18 class My : Attribute {
19 public int val;
20 public uint prop;
21 public string s;
22 public string sval;
23 public byte bb;
24 public uint P {
25 set {prop = value;}
26 get {return prop;}
28 public string S {
29 set {s = value;}
30 get {return s;}