Give prove, stepInto and columnItems a case per node kind, panicking on the rest

This commit is contained in:
2026-09-29 09:37:32 +02:00
committed by Lillem4n
parent d01c914e7f
commit 16e4f4ebbb
5 changed files with 14 additions and 9 deletions
+3
View File
@@ -142,6 +142,9 @@ func stepInto(n node, seg string) (node, error) {
}
case *tableColumn:
return nil, fmt.Errorf("no field %q: %q is a column, and a cell holds no fields", seg, n.t.header[n.i])
case *nullItem:
default:
panic(internalError("stepInto has no case for node %T", n))
}
return nil, fmt.Errorf("no field %q", seg)
}