| 1 |
-- main.mcl -- |
| 2 |
import "fmt" |
| 3 |
$format = "%d" # should get ignored |
| 4 |
$fn = func($format) { |
| 5 |
fmt.printf($format, 42) |
| 6 |
} |
| 7 |
$name = $fn("%s") |
| 8 |
test "${name}" {} |
| 9 |
# should error at unification if possible, otherwise at runtime |
| 10 |
# TODO: I would expect that if the "%s" and "%d" swapped, that speculatively we |
| 11 |
# would be able to run this at compile time and know the result statically. |
| 12 |
-- OUTPUT -- |
| 13 |
# err: errStream: func `printf@??????????` stopped before it was loaded: base kind does not match (str != int) |