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

property expressions using "this" as object part won't work in combination with @Category

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6
    • 1.6.1, 1.7-beta-1
    • None
    • None

    Description

      @Category(Distance)
      class DistanceCategory {
          Distance plus(Distance increment) {
              new Distance(number: this.number + increment.number)
          }
      }

      here this.number is a PropertyExpression and the this needs to be transformed, but is not. The transform uses ClassCodeExpressionTransformer which does not transform the object part in Propoertyxpressions. ResolveVisitor makes use of that class too, so a fix has to take special attention to that

      Attachments

        1. 3367_v16x_patch.txt
          1 kB
          Roshan Dawrani

        Activity

          People

            roshandawrani Roshan Dawrani
            blackdrag Jochen Theodorou
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: