blob: 6ab4099beb54389709c9d41c427b75b8f1f3ee8d [file] [log] [blame]
James Price94ac0782021-06-02 17:23:03 +00001type ArrayType = array<i32, 4>;
2
3struct S {
4 arr : array<i32, 4>;
5};
6
7fn foo() {
8 let src : ArrayType = ArrayType();
9 var dst : ArrayType;
10 var dst_struct : S;
11 var dst_array : array<ArrayType, 2>;
12 let dst_ptr : ptr<function, ArrayType> = &(dst);
13 let dst_struct_ptr : ptr<function, S> = &(dst_struct);
14 let dst_array_ptr : ptr<function, array<ArrayType, 2>> = &(dst_array);
15 dst_struct.arr = src;
16 dst_array[1] = src;
17 *(dst_ptr) = src;
18 (*(dst_struct_ptr)).arr = src;
19 (*(dst_array_ptr))[0] = src;
20}