Panic through internalError on a disagreement key with no fix

This commit is contained in:
2026-09-29 03:51:44 +02:00
committed by Lillem4n
parent 526b4c84fd
commit c304dae303
2 changed files with 9 additions and 3 deletions
+9 -1
View File
@@ -198,7 +198,15 @@ func disagreement(a *template, da DataType, b *template, db DataType) error {
d.fix, d.other, d.want = b, a, da
}
proven := (&valueProof{}).proveColumnItem(d.fix).not[d.want] == ""
return disagreements[disagreementKey{kindOf(d.fix), kindOf(d.other), proven}](d)
return disagreementFix(disagreementKey{kindOf(d.fix), kindOf(d.other), proven})(d)
}
func disagreementFix(k disagreementKey) func(d itemPair) error {
fix, ok := disagreements[k]
if !ok {
panic(internalError("no disagreement names the fix for %+v", k))
}
return fix
}
func holdOne(d itemPair) error {
-2
View File
@@ -26,8 +26,6 @@ least modify.
This round, in order:
- Test that `disagreements` holds every key `disagreement` can build, and panic through
`internalError` on a miss: a missing key is a nil func call today.
- Name `printedNumber`'s `dp` cases, and say on `builtin` what `prints` and
`proveNumber` a new builtin sets: the extender copied `digits` by analogy.
- Rename the names that mislead: `table.pinnedRow` is the row node, not a pinned row;