[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / tests / test-139.cs
1 //
2 // This tests two uses of the `This' expression on structs; being used as an argument
3 // and being used implicitly.
4 //
5
6 struct T {
7         int val;
8         void one () {
9
10                 //
11                 // First test: Pass this as an argument.
12                 //
13                 two (this);
14         }
15
16         void two (T t)  {
17                 this = t;
18         }
19
20         void three (ref T t) {
21                 two (t);
22         }
23
24
25         public override int GetHashCode () {
26                 //
27                 // Second test: do we correctly load this?
28                 //
29                 return val.GetHashCode();
30         }
31
32         public static int Main()        
33         {
34                 T t = new T ();
35
36                 t.one ();
37
38                 t.GetHashCode ();
39                 
40                 return 0;
41         }
42 }
43
44
45
46
47
48