Move Enum and CorElementType to shared (dotnet/coreclr#23177)
[mono-project.git] / mcs / tests / gtest-647.cs
blob4aae641f85f2bc5057c709450395caf6e61cbcc3
1 using System;
3 public class Program
5 public static int Main ()
7 int B = default (MyStruct?);
8 if (MyStruct.counter != 1)
9 return 1;
11 switch (default (MyStruct?)) {
12 case 0:
13 break;
14 default:
15 return 2;
18 if (MyStruct.counter != 2)
19 return 4;
21 return 0;
24 public struct MyStruct
26 public static int counter;
28 public static implicit operator int (MyStruct? s)
30 ++counter;
31 return 0;