Skip to content

The definition of equality is insufficient for recursive nodes #63

@avakar

Description

@avakar

Consider the following document. Are *a and *b equal nodes? Does the map contain duplicate keys?

- &a [*a]
- &b [*b]
-
  *a: 1
  *b: 2

From https://yaml.org/spec/1.2/spec.html#id2764652:

Two sequences are equal only when they have the same tag and length, and each node in one sequence is equal to the corresponding node in the other sequence.

The nodes have the same tag and length, so it would seem that *a == *b if and only if *a == *b.

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