aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/parser/expr_conditional.good
blob: ba337167ec14d44bba13bce35cf1f560dfa74039 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14


() test() {
    int a = 1==2 then 3 else 4;
    int b1 = 1==2 then 3==4 then 5 else 6 else 7;
    int b2 = 1==2 then (3==4 then 5 else 6) else 7;
    int c1 = 0==1 then 2 else 3==4 then 5 else 6;
    int c2 = 0==1 then 2 else (3==4 then 5 else 6);
    
    int longtest = 1 == 10 then 100
              else 2 == 20 then 200
              else 3 == 30 then 300
              else 999;
    
}