Skip to content

Commit

Permalink
pkg/eval/vals/cmp.go: Use compareBuiltin for strings too.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaq committed Aug 26, 2023
1 parent a15f0f7 commit 1c0cffb
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions pkg/eval/vals/cmp.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,7 @@ func cmpInner(a, b any, recurse func(a, b any) Ordering) Ordering {
}
case string:
if b, ok := b.(string); ok {
switch {
case a == b:
return CmpEqual
case a < b:
return CmpLess
default: // a > b
return CmpMore
}
return compareBuiltin(a, b)
}
case List:
if b, ok := b.(List); ok {
Expand Down

0 comments on commit 1c0cffb

Please sign in to comment.