From 81500312dcfdde2bd07c5071c7948a61b1f952ba Mon Sep 17 00:00:00 2001 From: lemon Date: Sun, 7 Aug 2022 16:02:34 +0200 Subject: expand template at expression position --- bootstrap/test2.cff | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bootstrap/test2.cff') 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 { } } +struct Bit { + fn neg(x T) T { return ~x; } +} + extern fn main() void { let n Node = {#null, 0}; let n Node = {&n, 1}; @@ -18,4 +22,7 @@ extern fn main() void { let x Node = {}; n->ok(); x->ok(); + + Bit:neg(3); + Bit:neg(3); } -- cgit v1.2.3