New test.
authorMartin Baulig <martin@novell.com>
Wed, 4 Oct 2006 20:51:10 +0000 (20:51 -0000)
committerMartin Baulig <martin@novell.com>
Wed, 4 Oct 2006 20:51:10 +0000 (20:51 -0000)
svn path=/trunk/mcs/; revision=66265

1  2 
mcs/tests/gtest-anon-23.cs

index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0af13b8f997fdbf9730ac60e524d0964fa30f74c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,38 @@@
++using System;
++using System.Collections;
++using System.Collections.Generic;
++
++public delegate void Foo ();
++
++public class Test
++{
++      public static implicit operator Foo (Test test)
++      {
++              return delegate { Console.WriteLine ("Hello World!"); };
++      }
++
++      public static IEnumerable<Test> operator + (Test test, Test foo)
++      {
++              yield return test;
++              yield return foo;
++      }
++
++      public IEnumerable<int> Foo {
++              get {
++                      yield return 3;
++              }
++
++              set {
++                      Console.WriteLine ("Foo!");
++              }
++      }
++
++      static void Main ()
++      {
++              Test test = new Test ();
++              Foo foo = test;
++              foo ();
++              foreach (Test t in test + test)
++                      Console.WriteLine (t);
++      }
++}