Files
mgmt/lang/interpret_test/TestAstFunc2/structlookup3.txtar
James Shubin 8594b6e2a9 lang: funcs: Hint the struct_lookup functions better
If we have static information, use it to help unification.
2024-08-21 19:00:51 -04:00

16 lines
255 B
Plaintext

-- main.mcl --
import "fmt"
$st = struct{
field1 => "value1",
field2 => "value2",
}
class test_struct_lookup($v1, $v2) {
test "test-${v1}-${v2}" {}
}
include test_struct_lookup($st->field1, $st->field2)
-- OUTPUT --
Vertex: test[test-value1-value2]