Table.Write(nil) panics because reflect.TypeOf(nil) is nil and the implementation immediately calls Kind() on it. This contradicts Write behavior for other non-struct inputs, which are represented as an error row.
Acceptance criteria
- Add a regression test that calls
Write(nil) and demonstrates the intended non-panicking error-row behavior.
- Update
Write to handle a nil argument before accessing reflection type metadata.
- Ensure nil uses the same observable error-table/annotation behavior as other non-struct values.
- Run the relevant test suite.
Table.Write(nil)panics becausereflect.TypeOf(nil)is nil and the implementation immediately callsKind()on it. This contradictsWritebehavior for other non-struct inputs, which are represented as an error row.Acceptance criteria
Write(nil)and demonstrates the intended non-panicking error-row behavior.Writeto handle a nil argument before accessing reflection type metadata.