Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-1282

SchemaInferenceStack is missing typedef support

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Highest Highest
    • 7.0.1
    • 7.0.0
    • model-util
    • None

      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.

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: