[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / tests / gtest-462.cs
1 using System;
2
3 class Program
4 {
5         public static int Main ()
6         {
7                 Tester<int> t = new Tester<int> ();
8                 int r = t.Get (333);
9                 Console.WriteLine (r);
10                 if (r != 333)
11                         return 1;
12
13                 r = t.Get (222.12);
14                 Console.WriteLine (r);
15                 if (r != 0)
16                         return 2;
17
18                 return 0;
19         }
20
21         class Tester<T> where T : struct, IConvertible
22         {
23                 public T Get (object data)
24                 {
25                         var val = data;
26                         if (val is T)
27                                 return (T) val;
28                         return default (T);
29                 }
30         }
31 }