diff options
| author | 2022-08-07 16:02:34 +0200 | |
|---|---|---|
| committer | 2022-08-07 16:02:34 +0200 | |
| commit | 81500312dcfdde2bd07c5071c7948a61b1f952ba (patch) | |
| tree | 377ffd4c263a5f4984376793692eb5f71eda8983 /bootstrap/test2.cff | |
| parent | 92bbf45f333bbf9190befc52a6bc114dc2957e41 (diff) | |
expand template at expression position
Diffstat (limited to 'bootstrap/test2.cff')
| -rw-r--r-- | bootstrap/test2.cff | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bootstrap/test2.cff b/bootstrap/test2.cff index 66603ba..6fbb8fa 100644 --- a/bootstrap/test2.cff +++ b/bootstrap/test2.cff @@ -8,6 +8,10 @@ struct Node<T> { } } +struct Bit<T> { + fn neg(x T) T { return ~x; } +} + extern fn main() void { let n Node<int> = {#null, 0}; let n Node<int> = {&n, 1}; @@ -18,4 +22,7 @@ extern fn main() void { let x Node<f32> = {}; n->ok(); x->ok(); + + Bit<i32>:neg(3); + Bit<i64>:neg(3); } |