|
getMetatableOperation(left, op) || getMetatableOperation(right, op); |
The code takes first table of any and uses it for the Equality test. Lua rules:
- both operands must have the same table or, at lease, the same function
- if the above is not true, default equality check should be executed
Note: "same function" is a bit ambiguous, if it is lua function - all good; but it this is an external function, it is important to consider what "same" means. Probably, the simple reference check should be enough, but worth double checking.
lua-vm/src/interpreter/LuaInterpreter.ts
Line 676 in 99293c4
The code takes first table of any and uses it for the Equality test. Lua rules:
Note: "same function" is a bit ambiguous, if it is lua function - all good; but it this is an external function, it is important to consider what "same" means. Probably, the simple reference check should be enough, but worth double checking.