summaryrefslogtreecommitdiff
path: root/tests/foreach/collection-next-get-args.test
blob: effcfa59837e0a4d6ca208078d097d058461ba24 (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
Invalid Code

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

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

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

    public G get (int arg) {
        return (G)null;
    }
}