Refuse a calc over digits(0) or a repeat of 0, name an option's wrong kind as JSON does, type the name scope kinds, and compile only from a jsonvalue.Value

This commit is contained in:
2026-10-08 00:02:07 +02:00
committed by Lillem4n
parent ba2ae41ffe
commit 97e72988b1
13 changed files with 106 additions and 55 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ func datatypeOf(m map[string]any, pos position) (*DataType, error) {
}
name, ok := v.(string)
if !ok {
return nil, fmt.Errorf("datatype must be a string, got %T", v)
return nil, fmt.Errorf("datatype must be a string, not %s", jsonKind(v))
}
for d := DataTypeString; d < datatype.Count; d++ {
if name != d.String() {