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

@Log won't compile with @CompileStatic if "log" is used in a Closure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.4
    • 2.1.0-beta-1
    • Static compilation
    • None

    Description

      The log variable injected by the @Log annotation is not compiled if it's used inside a Closure.

      import groovy.transform.*
      import groovy.util.logging.*
      
      @Log
      @CompileStatic
      class GreetingActor {
      
        def receive = {
          log.info "test"
        }
      
      }
      

      Attachments

        Activity

          People

            melix Cédric Champeau
            chanwit Chanwit Kaewkasi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: