shithub: mc

ref: 954ff1977d4345d53a0e1996c7c3b39c51a2d470
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
}