[ilasm] Don't break arguments compatiblity
[mono-project.git] / mcs / tests / test-anon-138.cs
blob1d51085841ebc564cfa7f20731b9a321a3c02d42
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 public static int Main ()
32 var x = new Foo<int> ();
33 return x.ContainsAll (new [] { 4, 6, 78 }) ? 0 : 1;