Description
When unique statement is used within a grouping used by another grouping, YANG parser fails to build effective model.
For example, the following YANG model
module foo { namespace "urn:foo"; prefix "foo"; grouping bar-group { list bar { key bar; unique baz; leaf bar { type string; } leaf baz { type string; } } } grouping foo-group { container foo { uses bar-group; } } uses foo-group; }
causes this SourceException:
Caused by: org.opendaylight.yangtools.yang.parser.spi.source.SourceException: Error in module 'foo': cannot add '(urn:foo)baz'. Node name collision: '(urn:foo)baz' already declared at foo.yang:14:7 [at foo.yang:14:7]
Attachments
Issue Links
- is duplicated by
-
YANGTOOLS-1454 Node name collision already declared at <file>
-
- Resolved
-