[YANGTOOLS-1282] SchemaInferenceStack is missing typedef support Created: 30/Apr/21  Updated: 03/May/21  Resolved: 30/Apr/21

Status: Resolved
Project: yangtools
Component/s: model-util
Affects Version/s: 7.0.0
Fix Version/s: 7.0.1

Type: Bug Priority: Highest
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

SchemaInferenceStack.resolvePathExpression() in a situation like this:

module foo {
  prefix foo;
  namespace foo;

  typedef foo {
    type leafref {
      path /bar;
    }
  }

  leaf bar {
    type int64;
  }
}

The problem is that that there is no way to logically enter 'typedef foo', hence the stack can only remain uninitialized – and therefore it does not have a default namespace. That in turn means the path cannot be properly bound, leading to an IllegalArgumentException.

Introduce an 'enterTypedef()' method, which will give proper context to the resolution process.



 Comments   
Comment by Robert Varga [ 30/Apr/21 ]

This is a blocker issue for mdsal integration.

Generated at Wed Feb 07 20:55:42 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.