lang: funcs: core: fmt: Fix printf unification bug

We also add a backup fix to avoid a panic in case we ever hit a new
unification bug that lets something through, we can at least turn it
into a runtime issue. This adds a test as well.
This commit is contained in:
James Shubin
2023-08-13 17:42:23 -04:00
parent 1f53fd85b4
commit b8d87e2d5a
2 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
-- main.mcl --
import "fmt"
test fmt.printf("%d%d", 42) {} # should not pass, missing second int
-- OUTPUT --
# err: errUnify: only recursive solutions left