summaryrefslogtreecommitdiff
path: root/tests/semantic/foreach-next-value-args.test
blob: c0a3e575d257c078b0cf5007e373a0e2e72696e1 (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 G? next_value (string test) {
		return null;
	}
}

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

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