summaryrefslogtreecommitdiff
path: root/tests/semantic/foreach-next-get-void.test
blob: 8b32fda614a1c541a839affd935a2c6eefff5d56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Invalid Code

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

	public void get () {
		return;
	}
}

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

void main () {
	Test<string?> test = null;
	foreach (var t in test) {
	}
}