Skip to content

Commit

Permalink
Allow compare vpointer with vnull
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed May 29, 2024
1 parent 99eeb56 commit 3ea442c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hld/Eval.hx
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,8 @@ class Eval {
return d == 0 ? 0 : d > 0 ? 1 : -1;
case [VBool(ab), VBool((bb))]:
return ab == bb ? 0 : ab ? 1 : -1;
case [VPointer(aptr), VPointer(bptr)]:
return aptr.sub(bptr);
case [VPointer(_) | VNull, VPointer(_) | VNull]:
return getPtr(a).sub(getPtr(b));
case [VString(as,_), VString(bs,_)]:
return Reflect.compare(as, bs);
default:
Expand Down

0 comments on commit 3ea442c

Please sign in to comment.