(left, right value)
| 86 | } |
| 87 | |
| 88 | func (l *State) orderError(left, right value) { |
| 89 | leftType, rightType := l.valueToType(left).String(), l.valueToType(right).String() |
| 90 | if leftType == rightType { |
| 91 | l.runtimeError(fmt.Sprintf("attempt to compare two '%s' values", leftType)) |
| 92 | } |
| 93 | l.runtimeError(fmt.Sprintf("attempt to compare '%s' with '%s'", leftType, rightType)) |
| 94 | } |
| 95 | |
| 96 | func (l *State) arithError(v1, v2 value) { |
| 97 | if _, ok := l.toNumber(v1); !ok { |
no test coverage detected