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

Enum property access not working with @CompileStatic

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.12
    • Fix Version/s: 2.4.13
    • Component/s: Static compilation
    • Labels:
      None

      Description

      import groovy.transform.CompileStatic
      
      enum Foo { }
      
      @CompileStatic
      def test() {
        println Foo.getModifiers() // => 16401 // ENUM | FINAL | PUBLIC (see GROOVY_8360 wrt STATIC)
        println Foo.modifiers      // java.lang.NoSuchFieldError: modifiers
      }
      
      test()
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shils Shil Sinha
                Reporter:
                paulk Paul King
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: