Skip to content

Coerce container types during comparisons #6612

@mattnibs

Description

@mattnibs

Currently equality comparisons only work for complex/container types if the types exactly match.

For instance:

values 
  {x:1} == {x:1::uint32},
  [1,2] == [1::uint32,2::uint32]
  |{"foo":2}| == |{"foo":2::uint32}|

all return false because the types of the containers are not the same. We should instead be coercing the comparable leaf values like we do when comparing primitives (e.g., 1 == 1::uint32).

Additionally, equality comparisons just flat do not work for vector runtime. Fix this as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions