aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/verifier/expr_arrayliteral.good
blob: facded3f53ae41f89df03f0fc03a8b3b423d5784 (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
30
31
32
33
34
35


int#[3] M;

() takearray(int#[3] arr)
{
    
}

int main()
{
    var int a = 12;
    a = 14;
    
    takearray([1, 2, 3]);
    
    var int#[3] A;
    
    A = M;
    
    A = [4, 5, 6];
    
    int x = [1,2,3]#[1];
    int y = [[1,2], [3,4]]#[1]#[1];
    int z = ([[1,2], [3,4], [5,6]] as int#[3,2])#[2,1];
    
    takearray([[1,2,3], [4,5,6]]#[0]);

    bool#[2] ba = [:true, :false];
    bool b1 = [:true, :false]#[1];
    bool b2 = [[:true], [:false]]#[1,0];

    return 0;
}