Bug 8922 - Evaluation of if-features is done regardless of ancestors 72/61572/1
authorPeter Kajsa <pkajsa@cisco.com>
Tue, 8 Aug 2017 16:11:16 +0000 (18:11 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 13 Aug 2017 10:42:37 +0000 (12:42 +0200)
commit6d56ef028aa9d143a04096abd3a82112eeef3314
treea3a557cb95036971983bb00c9757332ca2177b51
parent0334db2b2d2a83b9fed00e223f0e0efc22cbc4a3
Bug 8922 - Evaluation of if-features is done regardless of ancestors

Evaluation of if-features for a statement is done regardless of its
ancestors. This is not correct and if an ancestor of a statement is
not supported by features, then current statement should be
unsupported too. In other words, if a statement is not supported by
features, then all its children should be unsupported too.

Change-Id: Ieb8a3c32849808a4492f518f4481aaef45c11cae
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
(cherry picked from commit 668b0262993e44cb007754a0fdf08c0edb7649d2)
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/RootStatementContext.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/StatementContextBase.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SubstatementContext.java
yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/Bug8922Test.java [new file with mode: 0644]
yang/yang-parser-impl/src/test/resources/bugs/bug8922/foo.yang [new file with mode: 0644]