shithub: mc

ref: 4d0895a4c80d5db3fe2c304b0820cb724d9ac0c3
dir: /test/structlit.myr/

View raw version
/* checks that we can create struct literals with named initializers.
	exits with 42. */
type t = struct
	a	: int
	b	: char
	c	: char[,]
;;

const main = {
	var v : t

	v = [.a=42, .b='x', .c="foo"]
	-> v.a
}