Debian Codegraph @

lang/interpret_test/TestAstFunc1/polydoubleinclude.txtar

raw
1 -- main.mcl --
2 import "fmt"
3
4 # note that the class can have two separate types for $b
5 include c1("t1", "hello") # len is 5
6 include c1("t2", [13, 42, 0, -37,]) # len is 4
7 class c1($a, $b) {
8 test "${a}" {
9 anotherstr => fmt.printf("len is: %d", len($b)),
10 }
11 }
12 -- OUTPUT --
13 Edge: FuncValue -> call # fn
14 Edge: FuncValue -> call # fn
15 Edge: FuncValue -> call # fn
16 Edge: FuncValue -> call # fn
17 Edge: const -> composite # 0
18 Edge: const -> composite # 1
19 Edge: const -> composite # 2
20 Edge: const -> composite # 3
21 Vertex: FuncValue
22 Vertex: FuncValue
23 Vertex: FuncValue
24 Vertex: FuncValue
25 Vertex: call
26 Vertex: call
27 Vertex: call
28 Vertex: call
29 Vertex: composite
30 Vertex: const
31 Vertex: const
32 Vertex: const
33 Vertex: const
34 Vertex: const
35 Vertex: const
36 Vertex: const
37 Vertex: const
38 Vertex: const