Refuse a name registered as a builtin and a transform, build the offered calls once, and drop the done item

This commit is contained in:
2026-09-25 08:46:53 +02:00
committed by Lillem4n
parent d81cfd5757
commit fbc8fe78c9
4 changed files with 11 additions and 10 deletions
+4 -2
View File
@@ -149,8 +149,8 @@ func (p *valueProof) template(t *template) proven {
case t.fixed:
return literalValue(t.lit)
case len(t.ops) != 1:
v := unproven(notOneValue(t.format, numberCalls(false)))
v.notOperand = notOneValue(t.format, numberCalls(true))
v := unproven(notOneValue(t.format, typedCalls))
v.notOperand = notOneValue(t.format, operandCalls)
return v
}
o := t.ops[0]
@@ -288,6 +288,8 @@ func printing(token string, prints DataType, v proven) proven {
return v
}
var typedCalls, operandCalls = numberCalls(false), numberCalls(true)
// numberCalls lists the builtins printing a number, or with text also those whose text
// is one.
func numberCalls(text bool) string {