17 lines
461 B
Plaintext
17 lines
461 B
Plaintext
//ww:run-exit 0
|
|
// Graduated #34 reject pin: a 16B GP struct CALL element appends
|
|
// through the per-site scratch receive (was the loudstop fixture).
|
|
package main;
|
|
type pt = struct { x: i32, y: i32, z: i64 };
|
|
fn mk() pt = {
|
|
return pt { x = 1, y = 2, z = 3 };
|
|
};
|
|
export fn main() i32 = {
|
|
let xs: []pt = [];
|
|
append(xs, mk());
|
|
if (xs.len != 1) { return 1; };
|
|
if (xs[0].x != 1 || xs[0].y != 2) { return 2; };
|
|
if (xs[0].z != 3i64) { return 3; };
|
|
return 0;
|
|
};
|