Debian Codegraph @

lang/interpret_test/TestAstFunc2/test-one-instance-bind.txtar

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