aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/backend/switch_nonscalar.good
blob: fae0ee552ba7d34d5ad9d8e80ba41835f0062356 (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

int test()
{
    int#[2] arr = [2,2];
    switch [1,2] as int#[2] {
        case [0,1]
        case arr {
            if bool:true == bool:false return 1;
            return 2;
        }
        case [1,2] {
            if bool:true == bool:false return 3;
        }
        default {
            return 9;
        }
    }
    
    switch arr#[0] {
        case "test"#[0]
        case 1 + 2 {
            return 10;
        }
    }
    
    return 0;
}