diff options
| author | 2022-08-19 10:41:25 +0200 | |
|---|---|---|
| committer | 2022-08-19 10:41:25 +0200 | |
| commit | e9543de5ab1de08a452de4b9df705c43aa9ff6ac (patch) | |
| tree | 0bfbb8c2794a1181c4e52d29b351239c447f42c8 /bootstrap/test2.cff | |
| parent | b6c31ebc4a33831c8f59e43984f3af950d418b88 (diff) | |
templates
Diffstat (limited to 'bootstrap/test2.cff')
| -rw-r--r-- | bootstrap/test2.cff | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bootstrap/test2.cff b/bootstrap/test2.cff index ddeec15..c4aedd9 100644 --- a/bootstrap/test2.cff +++ b/bootstrap/test2.cff @@ -8,6 +8,10 @@ struct Node<T> { } } +struct Array<T, N usize> { + m [N]T, +} + def X = 7 + 2; struct Bit<T> { @@ -34,12 +38,14 @@ enum union Option<T> { extern fn main() void { let n Node<int> = {#null, 0}; let n Node<int> = {&n, 1}; + let x Array<int, 10> = {}; + let x Array<int, 0xB - 1> = x; let x int #?; x = X + 1 + Y; let const v= Value:None; - switch (v) { + switch v { case None; case Int i; i; |