aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/verifier/statement_for.bad
blob: 13c934121236f381410921462fa7c46582962b57 (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
25
26
27
28
29
30
31
32
33
34
35
36
37


namespace ns {
    int a = 1;
}

typedef thing1 = int;
typedef thing2 = (int x);
typedef thing3 = (int next_element);
namespace thing4 {
    typedef here = (int x);
    
    bool next_element(int wrong);
}

() test()
{
    /* ERRORS */
    for int a in [:true, :false] as bool#[2] { }
    for int b in none { }
    for xx c in [1,2,3] {}
    for int d in nonexistant {}
    for int e in :true {}
    for int f in ns {}
    for int g in thing1 {}
    for int h in thing2 {}
    for int i in thing3 {}
    for int j in thing4 {}
    for int # in [1,2,3] {}
    for int # in :int {}

    for int loopvar in [1,2,3] {}

    /* ERRORS variables not available here */
    var int zz = loopvar;

}