shithub: mc

ref: 5927f8f8d3b4ab40d2aacfae4b3cbd593c5e7f01
dir: /test/structasn.myr/

View raw version
use std
/* tests block assignment of structs. exits with 42.*/
type pair = struct
	a : int
	b : int
;;

const main = {
	var x : pair
	var y : pair
	x.a = 12
	x.b = 30
	y = x
	std.exit(y.a + y.b)
}