formatter.go: typeName() renamed as TypeName()

This commit is contained in:
2024-06-10 09:37:27 +02:00
parent 54041552d4
commit 1757298eb4
9 changed files with 16 additions and 16 deletions
+4 -4
View File
@@ -156,15 +156,15 @@ func (self *term) toInt(computedValue any, valueDescription string) (i int, err
if index64, ok := computedValue.(int64); ok {
i = int(index64)
} else {
err = self.Errorf("%s, got %s (%v)", valueDescription, typeName(computedValue), computedValue)
err = self.Errorf("%s, got %s (%v)", valueDescription, TypeName(computedValue), computedValue)
}
return
}
func (self *term) errIncompatibleTypes(leftValue, rightValue any) error {
leftType := typeName(leftValue)
leftType := TypeName(leftValue)
leftText := getFormatted(leftValue, Truncate)
rightType := typeName(rightValue)
rightType := TypeName(rightValue)
rightText := getFormatted(rightValue, Truncate)
return self.tk.Errorf(
"left operand '%s' [%s] and right operand '%s' [%s] are not compatible with operator %q",
@@ -176,7 +176,7 @@ func (self *term) errIncompatibleTypes(leftValue, rightValue any) error {
func (self *term) errIncompatibleType(value any) error {
return self.tk.Errorf(
"prefix/postfix operator %q do not support operand '%v' [%s]",
self.source(), value, typeName(value))
self.source(), value, TypeName(value))
}
func (self *term) Errorf(template string, args ...any) (err error) {