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

Initial expressions are not transformed in traits

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.0-beta-1
    • 2.3.0-beta-2
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: