summaryrefslogtreecommitdiff
path: root/lib/std/test/try.myr
blob: 525b95cf48f7704d9877bd4b86835bb796bf4c25 (plain)
1
2
3
4
5
6
7
8
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")
}