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

Initial expressions are not transformed in traits

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0-beta-1
    • Fix Version/s: 2.3.0-beta-2
    • Component/s: None
    • Labels:
      None

      Description

      The following code fails because initial expressions are not transformed:

      trait Dummyable  {
          String x = this.class.name
      
          void info() {
              assert x == this.class.name
          }
      }
      
      
      class Util implements Dummyable {}
      
      def util = new Util()
      util.info()
      

        Attachments

          Activity

            People

            • Assignee:
              melix Cédric Champeau
              Reporter:
              melix Cédric Champeau
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: