shithub: mc

ref: b3a8a63686f2447dea9c135ab863cee5364b3a07
dir: /test/nestucon.myr/

View raw version
use std

type t = struct
	x : union
		`Int int
		`Str byte[:]
	;;
;;

const main = {
	var a : t

	a = [.x = `Str "asdf"]
	match a
	| [.x=`Str s]:	std.put("%s\n", s)
	;;
}