aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/parser/scoping_order.bad
blob: 60f2f032cb2d9805c95e66703ad1ca246f264cfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21


int a;

() f() {
    
    a b;    // ERROR: "a" is not a type
    
    typedef a = int;
    
    {
        c + c;      // ERROR: not declared yet
        var a c = 0;
        while c < 10 { c += 1; }
        
        var a c = 3;    // ERROR: duplicate identifier
        while c < 10 { c += 1; }
    }
    
}