Merge pull request #4845 from lambdageek/dev-coop-delegates
[mono.git] / mcs / errors / cs0151-4.cs
1 // CS0151: A switch expression of type `S1?' cannot be converted to an integral type, bool, char, string, enum or nullable type
2 // Line: 24
3
4 using System;
5
6 struct S1
7 {
8         public static implicit operator int? (S1? s)
9         {
10                 throw new ApplicationException ();
11         }
12
13         public static implicit operator int (S1? s)
14         {
15                 throw new ApplicationException ();
16         }
17 }
18
19 class C
20 {
21         public static int Main ()
22         {
23                 S1? s1 = new S1 ();
24                 switch (s1)
25                 {
26                         default:
27                                 return 1;
28                 }
29         }
30 }