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

Lack of compilation error while statically compiled the closure.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.5, 2.4.7
    • 4.0.0-rc-2
    • Compiler
    • Linux version 3.13.0-24-generic (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) )

    Description

      Expecting compile time error that cannot reference non-static variable from static context but stacktrace presents runtime MissingPropertyException. @CompileStatic is enabled on the class level. The code block to reproduce the issue can be found in the attached link. It also includes the output of running the sample code.

      https://gist.github.com/dwarszawski/41aed2cf53486a5603447f54a44b4ac3

      Attachments

        Activity

          People

            emilles Eric Milles
            dwarszawski Damian Warszawski
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: