[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / tests / gtest-anontype-04.cs
1
2 // Tests anonymous types initialized with a mix of literals, local variables and object members
3 using System;
4 using System.Collections;
5
6 public class MyClass
7 {
8         public string Foo = "Bar";
9         public int Baz {
10                 get { return 16; }
11         }
12 }
13
14 public class Test
15 {
16         public static int Main ()
17         {
18                 string Hello = "World";
19                 MyClass mc = new MyClass();
20                 var v = new { mc.Foo, mc.Baz, Hello, Answer = 42 };
21                 
22                 if (v.Foo != "Bar")
23                         return 1;
24                 if (v.Baz != 16)
25                         return 2;
26                 if (v.Hello != "World")
27                         return 3;
28                 if (v.Answer != 42)
29                         return 4;
30                 
31                 return 0;
32         }
33 }