From e55b9cc89ba9f19f10f32dd028fdea188658ef9f Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 30 Sep 2026 16:57:54 +0200 Subject: [PATCH] Panic in readFold.reads on a node kind it has no case for --- reads.go | 3 +++ todo.md | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/reads.go b/reads.go index 00a340c..10890f0 100644 --- a/reads.go +++ b/reads.go @@ -97,6 +97,9 @@ func (f *readFold) reads(n node) []pathRead { out = f.rowReads(n.t, func(b *branches, row int) bool { return b.enter(n.t, row) }) case *tableColumn: out = f.cellReads(n, func(b *branches, row int) bool { return b.enter(n.t, row) }) + case *folder, *nullItem: + default: + panic(internalError("reads has no case for node %T", n)) } out = distinct(out) f.memo[n] = out diff --git a/todo.md b/todo.md index 41a234d..cc227ea 100644 --- a/todo.md +++ b/todo.md @@ -40,8 +40,6 @@ maintainer chose on 2026-09-30 to go on with the path steps regardless. This round, in order: -- Give `readFold.reads` a `default` that panics, as every other switch over node kinds - does: a new kind contributes no reads and the draw fence passes it silently. - Correct `rowReads`' "checkOwnFamily's refusal, which runs first": `checkNodeFences` runs `checkDrawGroup`, which folds through it, before `checkOwnFamily`. - Compile each path once at link into steps holding no pointer, with its leaves and