shithub: mc

ref: fc03d6189b22d17ac7554ac3de5ab5d47f7d0030
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)
	;;
}