shithub: mc

ref: 974475bcfe52a488d9f5e83e474b6ca3670d5f6a
dir: /lib/std/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.get(x) == 123, "expected 123 from try")
	std.assert(std.try(r) == 666, "expected 123 from try")
}