shape/anchor/an unused anchor on a collection, aliased into a key

sha256 b47da42138538e87768cea91caf993b0ca46840276865ed400bfbe90fdf059a0

Document

first: &x [1, 2]
second: &x [1, 2]
kept:
  nested: 1
  list:
    - a
    - b
also: |
  literal
  content
*x : keyed

Corpus

grammarvalid, vouched for up to construct
anchor/alias-as-keyaccept from compose on, 7.1: an alias is a node, and a node may be a mapping key
anchor/redefinedaccept from compose on, 3.2.2.2: an anchor name may be reused, and the alias takes the most recent
key/not-a-scalaropen from construct on: each parser's stance decides
featuresnone
meaning (none stated)

Answer groups

verdict split

go-yaml yaml.v3

refuse by the loader

libfyaml

accept, then the loader refuses past parse

perlref yamlstar

accept

value

yamlstar

{"[1 2]":"keyed","also":"literal\ncontent\n","first":[1,2],"kept":{"list":["a","b"],"nested":1},"second":[1,2]}

roundtrip

No source answered.

Each parser

parserverdictvalueround tripreasonmessage
perlref accepted accept n/i n/i
libfyaml accepted refuse by the loader not scored n/i TypeError: unhashable type: 'sequence'
yamlstar accepted accept not scored n/i
yaml.v3 rejected, explained refuse by the loader not scored refused collection-key: yaml.v3 decodes a mapping into a Go map, and a Go map cannot take a sequence or a mapping as a key: "? [1, 2]" rejects the document yaml.v3: yaml: invalid map key: []interface {}{1, 2}
go-yaml rejected, as declared refuse by the loader not scored refused key/not-a-scalar: go-yaml refuses this on purpose [11:1] a sequence cannot be a JSON key

Corpus compact, 28279 cases, yamlcorpus/48. Run 2026-11-26 22:12 UTC, 23m30s.