summaryrefslogtreecommitdiff
path: root/mcs/errors/cs1624-4.cs
blob: be1f9a86c11ffeed6d071bb237b04e5a27f246cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// CS1624: The body of `C.Test<TSource>(System.Collections.Generic.IEnumerable<TSource>)' cannot be an iterator block because `TSource' is not an iterator interface type
// Line: 8

using System.Collections.Generic;

public class C
{
	public static TSource Test<TSource>(IEnumerable<TSource> source)
	{
		foreach (TSource element in source)
			yield return element;
	}
}