aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/verifier/expr_notused.bad
blob: 5bdad479f5186a3eb3caae91d119b7ffe1bbc79f (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

() f() {
    int i;
    int j;
    uint u;
    bool b1;
    bool b2;
    int? opt;

    /* ERRORS */
    @i;
    i + j;   // also ambiguous expression type
    i == j;
    i < j;
    i > j;
    b1 xor b2;
    not b1;
    compl u;
    u bitand u;
    u bitor u;
    u bitxor u;
    makeopt i;
    opt?;

    // TODO array index, dereference etc. are tricky, because reading memory could have side-effects in low-level programs
}