summaryrefslogtreecommitdiff
path: root/tests/semantic/foreach-next-args.test
blob: 069353b57a961c4a13fc5c62f40b1744e8417a01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Invalid Code

public class Iterator<G> {
	public bool next (string test) {
		return true;
	}
}

public class Test<G> {
	public Iterator<G> iterator () {
		return new Iterator<G> ();
	}
}

void main () {
	Test test;
	foreach (var t in test) {
	}
}