James Price | 94ac078 | 2021-06-02 17:23:03 +0000 | [diff] [blame] | 1 | type ArrayType = array<i32, 4>; |
| 2 | |
| 3 | struct S { |
| 4 | arr : array<i32, 4>; |
| 5 | }; |
| 6 | |
| 7 | fn 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 | } |