adamvoss / vscode-yaml

YAML language support, including JSON Schema validation, for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=adamvoss.yaml
MIT License
29 stars 5 forks source link

Merging in multiple anchors results in validation error #18

Open puco opened 6 years ago

puco commented 6 years ago

When using anchors and merging multiple anchors into the same object Visual Studio Code complains about invlid document.

Document:

.numbers: &numbers
  one: "1"
  two: "2"

.countries: &countries
  us: "United States"
  uk: "United Kingdom"

instance1:
  <<: *numbers
  <<: *countries
  something: "else"

Expected result: The document is valid

Actual result: Error in validating document

JS-YAML: duplicate key at line 10, column 3
JS-YAML: duplicate key at line 11, column 3

2017-12-21 16_36_32