lang: ast, core: fmt: Catch invalid nil signatures

We accidentally had a bad error triggered.
This commit is contained in:
James Shubin
2024-08-21 18:50:11 -04:00
parent 7557114b4e
commit e6cb776eb6
2 changed files with 5 additions and 1 deletions

View File

@@ -178,7 +178,7 @@ func (obj *PrintfFunc) FuncInfer(partialType *types.Type, partialValues []types.
// Assume x does not contain unification variables!
if x.HasUni() {
// programming error (did the compiler change?)
return nil, nil, errwrap.Wrapf(err, "programming error at arg index %d", i)
return nil, nil, fmt.Errorf("programming error at arg index %d", i)
}
if err := unificationUtil.UnifyCmp(x, formatList[i-1]); err != nil {
return nil, nil, errwrap.Wrapf(err, "inconsistent type at arg index %d", i)