diff options
| author | 2022-08-08 05:33:56 +0200 | |
|---|---|---|
| committer | 2022-08-08 05:33:56 +0200 | |
| commit | cbed5a14aa8c1624f6f350d92c1de0c9ef55e40c (patch) | |
| tree | fc0c7a6877baa50bdac78e898866a0f241ed1cb6 /bootstrap/test2.cff | |
| parent | 96ef1857bac446f4e065e7c10530213e361d726a (diff) | |
basic pattern matching
Diffstat (limited to 'bootstrap/test2.cff')
| -rw-r--r-- | bootstrap/test2.cff | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bootstrap/test2.cff b/bootstrap/test2.cff index e5e484a..4690f72 100644 --- a/bootstrap/test2.cff +++ b/bootstrap/test2.cff @@ -31,8 +31,13 @@ extern fn main() void { let x int #?; x = X + 1 + Y; - let v Value = :None; + let v= Value:None; v = :Int 3; + switch (v) { + case None; + case Int i; + i; + } printf("n %d\n", n.value); printf("n link %d\n", n.link.value); |