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

Incorrect union generated code when using decimal64

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 4301

    Description

      Code generation fails when processing next yang input:

      typedef cd-working-range-t {
      type union {
      type enumeration

      { enum "NA"; }

      type decimal64

      { fraction-digits 2; range "-70000..70000"; }

      }
      }

      • with following error:
        [ERROR] /C:/*/CdWorkingRangeT.java:[24,33] cannot find symbol
        [ERROR] symbol: method getValue()
        [ERROR] location: variable _decimal64 of type java.math.BigDecimal

      BigDecimal doesn't have .getValue() method, so code generator should take this into account.

      Problem was reported for Helium-SR4, but it persists even in Beryllium.

      Attachments

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

        Activity

          People

            martin.ciglan Martin Ciglan
            michal.polkorab@gmail.com Michal Polkorab
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: