[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / tests / test-184.cs
1 //
2 // This bug exposes a problem when calling a struct constructor that is
3 // initialized from an instance constructor
4 //
5 using System;
6 public interface Interface
7 {
8         int X{ get; }
9 }
10
11 public struct Struct : Interface
12 {
13         public Struct( int x ) { }
14         public int X { get { return 0; } }
15 }
16
17 public class User
18 {
19         public User( Interface iface ) { }
20 }
21 public class Test
22 {
23         User t;
24         Test() { t=new User (new Struct(5)); }
25
26         //
27         // This one was not handled before by the compiler
28         // constrast that to the use on the constructor above, that
29         // worked just fine
30         //
31         User t2=new User(new Struct(251));
32
33         public static int Main ()
34         {
35                 Test tt = new Test ();
36
37                 return 0;
38         }
39 }
40
41
42