aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/verifier/expr_comparison.good
blob: 244f70ca33929e35e212a8f5e32fe4bfa7574208 (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


int f() {

    int i;
    
    if 3 > 2 { }
    if i > 2 { }
    if i > i { }

    (int x, int y) v;
    if v == (1, 2) { }
    if (1, 2) == v return 0;

    byte b;

    if i == b return 0;

    byte^ bp;
    byte^? bpo;

    if bpo == none return 0;
    if none == bpo return 1; // don't write it like this
    if bp == bpo? return 2;
    if bpo? == bp return 3;
    if makeopt bp == bpo return 4;
    if bpo == makeopt bp return 5;

    return 0;
}