Debian Codegraph @

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

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