Debian Codegraph @

lang/interpret_test/TestAstFunc2/fortytwo.txtar

raw
1 -- main.mcl --
2 import "fmt"
3 import "math"
4 # FIXME: floats don't print nicely: https://github.com/golang/go/issues/46118
5 # FIXME: This means that we see "42" for both, instead of 42.0 ...
6 # NOTE: It's important that we have both of these in the same test so that we
7 # can catch old unification bugs that saw ExprTopLevel as the same for both!
8 # This happened because we weren't copying the type signature being unified!
9 test [fmt.printf("int: %d", math.fortytwo()),] {}
10 test [fmt.printf("float: %f", math.fortytwo()),] {}
11 -- OUTPUT --
12 Vertex: test[float: 42]
13 Vertex: test[int: 42]