Answer architecture round 2: guard Noun's range, name calc once as builtinfunc.Calc, and place readTableOptions in item 46

This commit is contained in:
2026-10-05 15:48:34 +02:00
committed by Lillem4n
parent a229ae90a2
commit 679bd43c7c
7 changed files with 15 additions and 6 deletions
+6 -1
View File
@@ -31,4 +31,9 @@ func (d DataType) String() string {
}
// Noun is the datatype as an error names what a value is.
func Noun(d DataType) string { return nouns[d] }
func Noun(d DataType) string {
if d < 0 || d >= Count {
return d.String()
}
return nouns[d]
}