aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/verifier/type_compatibility_union.good
blob: 4d97fcc0f6e3f3fb4bf5cb1b4a5d6b397f2e5481 (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

typedef U = union (int i, bool b);

() test() {
    var U a;
    var union (int i, bool b) b;
    var union (int i, bool b) c;
    var union (int, bool) d;
    
    a = b;
    a = c;
    a = d;
    
    b = a;
    b = c;
    b = d;
    
    c = a;
    c = b;
    c = d;
    
    d = a;
    d = b;
    d = c;
}