Skip to content

Improve metastable equality checking #6

@andrewromanenco

Description

@andrewromanenco

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions