Bug 6771: Problem with typedefs nested in augment 51/46351/1
authorPeter Kajsa <pkajsa@cisco.com>
Tue, 27 Sep 2016 12:05:22 +0000 (14:05 +0200)
committerRobert Varga <nite@hq.sk>
Mon, 3 Oct 2016 11:25:00 +0000 (11:25 +0000)
commitc876221202e810d12a3f3c36d79fd22b69233763
treee97f73d2cc7395edaca6d4b506f326b21e0de905
parent0ab9979b537056119507bbed776f1b5ff668844b
Bug 6771: Problem with typedefs nested in augment

When a typedef is nested in a container that is in an augment,
the YANG parser produces an error. This is due to fact, that typedef
statements nested in augments are ignored in statement definition phase,
because AugmentStatement is supported only in full definition phase. The
same issue occurs also for Choice and Case statements. This patch
provides fix of these bugs.

Change-Id: I345fd50e7d9810bbedcc873241338fbdb3186b74
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
(cherry picked from commit baa1b88aaf83bc2917a3b0859f950c1e8daf40ba)
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/TypedefStatementImpl.java
yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/Bug6771Test.java [new file with mode: 0644]
yang/yang-parser-impl/src/test/resources/bugs/bug6771/augment/typedef-bug.yang [new file with mode: 0644]
yang/yang-parser-impl/src/test/resources/bugs/bug6771/choice-case/typedef-bug.yang [new file with mode: 0644]
yang/yang-parser-impl/src/test/resources/bugs/bug6771/grouping/typedef-bug.yang [new file with mode: 0644]