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

var.getProperties() cannot be invoked as var.properties when using @CompileStatic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.1
    • Static Type Checker
    • None

    Description

      @groovy.transform.CompileStatic
      class MyClass {
      
       void method() {
          String var = "Hola"
          println this.pepe
          println var.getProperties()    
          
          println var.properties  //Works without @CompileStatic, but it doesn't with it
       }
       
       
       String getPepe() {
       return "Hola Pepe";
       }
       
      }
      
      new MyClass().method()
      

      Attachments

        Activity

          People

            melix Cédric Champeau
            ariel.andres.morelli Ariel Morelli Andres
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: