Merge pull request #5636 from BrzVlad/fix-xmm-scan
[mono.git] / mcs / tests / gtest-595.cs
1 class MainClass
2 {
3         static class TypeConverter<TIn, TOut>
4                 where TIn : class
5                 where TOut : struct
6         {
7                 public static bool Convert(TIn input)
8                 {
9                         if (input is TOut)
10                         {
11                                 return true;
12                         }
13
14                         return false;
15                 }
16         }
17
18         public static int Main()
19         {
20                 object x = 3;
21                 if (TypeConverter<object, double>.Convert(x))
22                         return 1;
23
24                 if (!TypeConverter<I, S>.Convert(new S()))
25                         return 2;
26
27                 return 0;
28         }
29 }
30
31 interface I
32 {
33 }
34
35 struct S : I
36 {
37 }