Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8535

FieldNode constructor appears to call setType incorrectly

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.15
    • Fix Version/s: 2.5.6, 3.0.0-beta-1
    • Component/s: None
    • Labels:
      None

      Description

      If initial value expression is non-null, the first call to setType appears to have no effect.

          public FieldNode(String name, int modifiers, ClassNode type, ClassNode owner, Expression initialValueExpression) {
              this.name = name;
              this.modifiers = modifiers;
              this.type = type;
              if (this.type == ClassHelper.DYNAMIC_TYPE && initialValueExpression != null)
                  this.setType(initialValueExpression.getType());
              this.setType(type);
              this.originType = type;
      

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              emilles Eric Milles
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: