Fix code generation with leafrefs pointing to optional members
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 13 Jun 2023 14:57:25 +0000 (16:57 +0200)
committerAnil Belur <abelur@linuxfoundation.org>
Wed, 19 Jun 2024 00:41:45 +0000 (10:41 +1000)
commitf3a00a5ad08c2db6a78ce690402c27f6f923b107
tree75dfee9c2f0a8a6ce9a99c2e60c639f916c991e3
parentd5f3f79210a01c7a3c7975398f4443824eefd0a7
Fix code generation with leafrefs pointing to optional members

When we have a typedef which points to a location disabled by
if-feature, we need to accept this fact -- but do not allow that typedef
to be referenced.

JIRA: MDSAL-829
Change-Id: Ibde28faa2f96904dc16fcc6f5a922edc6bcffebb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-generator/src/main/java/org/opendaylight/mdsal/binding/generator/impl/reactor/AbstractTypeObjectGenerator.java
binding/mdsal-binding-generator/src/main/java/org/opendaylight/mdsal/binding/generator/impl/reactor/TypeReference.java
binding/mdsal-binding-generator/src/test/java/org/opendaylight/mdsal/binding/generator/impl/Bug4621Test.java
binding/mdsal-binding-generator/src/test/java/org/opendaylight/mdsal/binding/generator/impl/DefaultBindingGeneratorTest.java
binding/mdsal-binding-generator/src/test/java/org/opendaylight/mdsal/binding/generator/impl/GeneratedTypesLeafrefTest.java
binding/mdsal-binding-generator/src/test/java/org/opendaylight/mdsal/binding/generator/impl/Mdsal829Test.java [new file with mode: 0644]
binding/mdsal-binding-generator/src/test/resources/mdsal829.yang [new file with mode: 0644]