From 598be4cd1bdd79e4859ae30291f4d65682cc672a Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 9 Jan 2025 22:26:02 +0200 Subject: initial reference checking --- examples/callback.fwd | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 examples/callback.fwd (limited to 'examples/callback.fwd') diff --git a/examples/callback.fwd b/examples/callback.fwd new file mode 100644 index 0000000..f750b8b --- /dev/null +++ b/examples/callback.fwd @@ -0,0 +1,16 @@ +fwd_println(auto s); + +callee() +{ + fwd_println("Hello from callback!"); +} + +caller(*() callback) +{ + callback(); +} + +main() +{ + caller(callee); +} -- cgit v1.2.3