shithub: mc

ref: 6213b1e182c21e0903fcdae8e32ec5e93b61912c
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")
}