shithub: mc

ref: e6624da5efc4a98942a3620dae59c0610331a812
dir: /libstd/test/try.myr/

View raw version
use std

const main = {
	var x = `std.Some 123
	var r : std.result(int, byte[:]) = `std.Ok 666
	std.assert(std.val(x) == 123, "expected 123 from try")
	std.assert(std.try(r) == 666, "expected 123 from try")
}