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

FieldNode constructor appears to call setType incorrectly

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.15
    • 2.5.6, 3.0.0-beta-1
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: