[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / tests / dtest-error-03.cs
1 using System;
2 using Microsoft.CSharp.RuntimeBinder;
3 using System.Dynamic;
4 using System.Runtime.CompilerServices;
5
6 public class C
7 {
8 }
9
10 public class Test
11 {
12         public static int Main ()
13         {
14                 var getter = CallSite<Func<CallSite, object, object>>.Create (
15                                                  Binder.GetMember (
16                                                  CSharpBinderFlags.None, "n", null, new[] {
17                                                          CSharpArgumentInfo.Create (CSharpArgumentInfoFlags.None, null) }));
18
19                 try {
20                         getter.Target (getter, new C ());
21                 } catch (RuntimeBinderException e) {
22                         if (e.Message == "'C' does not contain a definition for 'n'")
23                                 return 0;
24
25                         return 2;
26                 }
27
28                 return 1;
29         }
30 }