Debian Codegraph @

lang/interpret_test/TestAstFunc2/test-one-instance-func-arg.txtar

raw
1 -- CONFIG --
2 {
3 "maximum-count": 1
4 }
5 -- main.mcl --
6 import "test"
7
8 func double($x) {
9 $x + $x
10 }
11
12 # one_instance_c should only produce one value, and will error if initialized twice
13 test "test1" {
14 anotherstr => double(test.one_instance_c()),
15 }
16
17 # one_instance_d should only produce one value, and will error if initialized twice
18 test "test2" {
19 anotherstr => double(test.one_instance_d()),
20 }
21 -- OUTPUT --
22 Vertex: test[test1]
23 Vertex: test[test2]