[LoongArch64] Part-5:add loongarch support in some files for LoongArch64. (#21769)
[mono-project.git] / mcs / tests / dtest-025.cs
blobc741ea76da6853b878f0277f03d8c76e5ced366f
1 interface I
3 void SetValue (int arg);
6 public struct S : I
8 public int Value;
10 public void SetValue (int v)
12 Value = v;
16 class C
18 static void Method<T> (ref T t) where T : struct, I
20 dynamic d = 25;
21 t.SetValue (d);
24 public static int Main ()
26 int? x = null;
27 dynamic y = 50;
28 int v = x.GetValueOrDefault(y);
29 if (v != 50)
30 return 1;
32 var s = new S ();
33 dynamic d = 5;
35 s.SetValue (d);
36 if (s.Value != 5)
37 return 2;
39 Method (ref s);
40 if (s.Value != 25)
41 return 3;
43 return 0;