dlr bug
[mcs.git] / tests / gtest-exmethod-01.cs
bloba82cadcc16850b3148566cbb2304d0fb6f2e090d
3 using System;
5 static class SimpleTest
7 public static string Prefix (this string s, string prefix)
9 return prefix + s;
13 public class M
15 public static int Main ()
17 SimpleTest.Prefix ("foo", "1");
18 string s = "foo".Prefix ("1");
20 Type ex_attr = typeof (System.Runtime.CompilerServices.ExtensionAttribute);
21 if (!typeof (SimpleTest).IsDefined (ex_attr, false))
22 return 1;
24 if (!typeof (SimpleTest).Assembly.IsDefined (ex_attr, false))
25 return 2;
27 if (!typeof (SimpleTest).GetMethod ("Prefix").IsDefined (ex_attr, false))
28 return 3;
30 if (s != "1foo")
31 return 9;
33 Console.WriteLine (s);
34 return 0;