aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/old/vlib/v/tests/anon_fn_call_test.v
diff options
context:
space:
mode:
Diffstat (limited to 'v_windows/v/old/vlib/v/tests/anon_fn_call_test.v')
-rw-r--r--v_windows/v/old/vlib/v/tests/anon_fn_call_test.v10
1 files changed, 10 insertions, 0 deletions
diff --git a/v_windows/v/old/vlib/v/tests/anon_fn_call_test.v b/v_windows/v/old/vlib/v/tests/anon_fn_call_test.v
new file mode 100644
index 0000000..5591e00
--- /dev/null
+++ b/v_windows/v/old/vlib/v/tests/anon_fn_call_test.v
@@ -0,0 +1,10 @@
+fn test_anon_fn_call() {
+ anon_fn := fn () string {
+ return test()
+ }
+ assert anon_fn() == 'Test'
+}
+
+fn test() string {
+ return 'Test'
+}