aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/verifier/expr_none_compare.good
blob: 36121da7bdc8c101bd6c6723b01a0fdcaa81d565 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

() f() {
    int^? a = none;
    int? b = none;
    int*> c = none;
    int+*> d = none;
    
    // it's recommended to write literal values on the right-hand
    // side, and variables on the left-hand side.
    if a == none { }
    if b == none { }
    if c == none { }
    if d == none { }
    
    // this syntax is discouraged
    if none == a { }
    if none == b { }
    if none == c { }
    if none == d { }
}