Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-6193

Ruta: Initial assignment of list variables behaves strangely

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.0ruta
    • Fix Version/s: 2.8.1ruta, 3.0.1ruta
    • Component/s: Ruta
    • Labels:
      None

      Description

      When list variables are declared with a list containing variables as initial value, the managing VariableListExpression seems to save the variable expression given with that argument list instead of the represented values. E.g.

      INTLIST somelist = {var};

      for a variable

      INT var = 1;
      

      stores the expression behind var instead of the value 1. So changing the value of var after the declaration of somelist still effects the value of somelist[0]. That's not the case if ADD was used instead.

      Consider this example:

      DECLARE testType (StringArray arr);
      STRING s = "a";
      STRINGLIST sl = {s};
      Document{ -> ADD(sl, s), s = "b", CREATE(testType, "arr" = sl)};

        Attachments

          Activity

            People

            • Assignee:
              pkluegl Peter Klügl
              Reporter:
              Michael Stenger Michael Stenger
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: