summaryrefslogtreecommitdiff
path: root/test/matchptr.myr
blob: f7f2f8b8947e0f23930f7eba17deae6de7db88d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use std

const main = {
	var x : std.option(std.option(int)#)

	x = `std.Some &(`std.Some 123)
	match x
	| `std.Some &(`std.None):	std.put("failed\n")
	| `std.Some &(`std.Some 666):	std.put("failed\n")
	| `std.Some &(`std.Some 123):	std.put("worked\n")
	| _:	std.put("failed\n")
	;;
}