Recognize 'choice' in 'choice' with YANG 1.1 24/100224/3
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 23 Mar 2022 13:23:10 +0000 (14:23 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 23 Mar 2022 17:15:41 +0000 (18:15 +0100)
commiteb017d49e00a06c1b29ac1a91d4d95007fa7c1a6
tree5e6afb37c20bae69afffaaeb95ba5237d14d230b
parent93a0d6a08c08438fa1b14e985693ddb9a427bae5
Recognize 'choice' in 'choice' with YANG 1.1

RFC7950 allows for 'choice' to appear directly in another 'choice'.
Make sure we allow for that possibility. This also requires
disconnecting shorthands from global state -- they are version-specific
after all.

JIRA: YANGTOOLS-1410
Change-Id: Id86cc8226d4e02d754317f840b9eadfe03949a9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
parser/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/reactor/YangValidationBundles.java
parser/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/meta/ChoiceStatementSupport.java
parser/yang-parser-rfc7950/src/test/java/org/opendaylight/yangtools/yang/stmt/YT1410Test.java [new file with mode: 0644]
parser/yang-parser-rfc7950/src/test/resources/bugs/YT1410/bar.yang [new file with mode: 0644]
parser/yang-parser-rfc7950/src/test/resources/bugs/YT1410/foo.yang [new file with mode: 0644]