aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/test2.cff
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-07 16:02:34 +0200
committerlemon <lsof@mailbox.org>2022-08-07 16:02:34 +0200
commit81500312dcfdde2bd07c5071c7948a61b1f952ba (patch)
tree377ffd4c263a5f4984376793692eb5f71eda8983 /bootstrap/test2.cff
parent92bbf45f333bbf9190befc52a6bc114dc2957e41 (diff)
expand template at expression position
Diffstat (limited to 'bootstrap/test2.cff')
-rw-r--r--bootstrap/test2.cff7
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);
}