aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/verifier/expr_comparison.bad
blob: d08559ffcf6012948dff64ed8bf408ffdff20379 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

() test()
{
    int i;
    
    /* ERRORS ambiguous types */
    if () == () return;
    if none == none return;
    if (1,) == (2,) return;
    if [12] == [34] return;
    
    /* ERRORS type mismatch */
    if 1 == none return;
    if i == none return;
    if i == bool:true return;
    if i == (i<i) return;

    /* ERRORS expressions must have a value */
    if test == test return;
    
    // TODO add more tests of type mismatches (also arrays of different size etc.)
    // TODO add tests of literals that will never match? e.g. byteval == 256
}