Skip to content

Commit

Permalink
Add compare of string with null
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed Nov 7, 2024
1 parent e5e7a8c commit 7112da2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hld/Eval.hx
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,8 @@ class Eval {
return getPtr(a).sub(getPtr(b));
case [VString(as,_), VString(bs,_)]:
return Reflect.compare(as, bs);
case [VString(_,_) | VNull, VString(_,_) | VNull]:
return b.v == VNull ? 1 : -1;
case [VEnum(ac, avalues, _), VEnum(bc, bvalues, _)]:
switch [a.t, b.t] {
case [HEnum(aproto), HEnum(bproto)] if( aproto == bproto ):
Expand Down

0 comments on commit 7112da2

Please sign in to comment.