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

SchemaInferenceStack is missing typedef support

    XMLWordPrintable

Details

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

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: