2010-06-21 Atsushi Enomoto <atsushi@ximian.com>
[mcs.git] / tests / gtest-exmethod-03.cs
blob8b9274690e87ac6bf6b68ec659c6ce0b3fc072aa
3 using System;
5 namespace A
7 public static class A
9 public static int Foo (this int i)
11 return 1;
14 public static int Foo (this int i, string s)
16 return 30;
21 namespace B
23 public static class X
25 public static int Foo (this int i)
27 return 2;
30 public static int Foo (this int i, bool b)
32 return 20;
37 namespace C
39 using A;
40 using B;
41 using D;
43 public static class F
45 public static bool Foo (this byte i)
47 return false;
51 namespace D
53 public static class F
55 public static int Foo (this int i)
57 return 66;
60 public static void TestX ()
62 int i = 2.Foo (false);
67 public static class M
69 public static int Foo (this int i)
71 return 4;
74 public static int Main ()
76 if (3.Foo ("a") != 30)
77 return 1;
79 if (((byte)0).Foo ())
80 return 2;
82 if (4.Foo (false) != 20)
83 return 3;
85 Console.WriteLine ("OK");
86 return 0;