[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / tests / gtest-exmethod-01.cs
1
2
3 using System;
4
5 static class SimpleTest
6 {
7         public static string Prefix (this string s, string prefix)
8         {
9                 return prefix + s;
10         }
11 }
12
13 public class M
14 {
15         public static int Main ()
16         {
17                 SimpleTest.Prefix ("foo", "1");
18                 string s = "foo".Prefix ("1");
19                 
20                 Type ex_attr = typeof (System.Runtime.CompilerServices.ExtensionAttribute);
21                 if (!typeof (SimpleTest).IsDefined (ex_attr, false))
22                         return 1;
23                 
24                 if (!typeof (SimpleTest).Assembly.IsDefined (ex_attr, false))
25                         return 2;
26
27                 if (!typeof (SimpleTest).GetMethod ("Prefix").IsDefined (ex_attr, false))
28                         return 3;
29
30                 if (s != "1foo")
31                         return 9;
32                 
33                 Console.WriteLine (s);
34                 return 0;
35         }
36 }