summaryrefslogtreecommitdiff
path: root/mcs/tests/gtest-linq-14.cs
blob: f477874ddf896554724cbdae38a6e7a19a3345a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.Linq.Expressions;

public enum Style : ulong {
	Foo,
	Bar,
}

public class Person {
	public Style Style { get; set; }
}

public interface IObjectContainer {}

public static class Extensions {

	public static IMarker<T> Cast<T> (this IObjectContainer container)
	{
		return null;
	}

	public static IMarker<T> Where<T> (this IMarker<T> marker, Expression<Func<T, bool>> selector)
	{
		return null;
	}
}

public interface IMarker<T> : IEnumerable<T> {}

public class Program {

	public static void Main ()
	{
	}
	
	public static void Assert (Action a)
	{
	}

	public static void Test (IObjectContainer o, Style s)
	{
		Assert (delegate {
			var res = from Person p in o
			where 0 == s
			select p;
		});
	}
}