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:
+1
-1
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user