GenericParameter.cs: override Module properly
[mcs.git] / tests / gtest-anon-38.cs
blob2495a62d2c0e17db8f6971d27cf08a6239399aa6
1 using System;
2 using System.Collections.Generic;
3 using System.Linq.Expressions;
5 class Foo<T>
7 public bool ContainsAll<U> (IEnumerable<U> items) where U : T
9 Func<bool> d = delegate () {
10 foreach (U item in items) {
11 Expression<Func<bool>> e = () => !Contains (item);
12 if (!e.Compile () ())
13 return false;
16 return true;
19 return d ();
22 public bool Contains (T t)
24 return false;
28 class Program
30 static int Main ()
32 var x = new Foo<int> ();
33 return x.ContainsAll (new [] { 4, 6, 78 }) ? 0 : 1;