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

Verify Error when using wrong enum syntax

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.7.5
    • 2.0.0
    • Compiler
    • None

    Description

      I've tried to declare an enum and made the mistake to put the constructor before the values:

      enum Foo {
        Foo(String str) {}, // first I tried with ; but this got me some other error
        ONE("one"), TWO("two")
      }
      

      What got me distracted is that Groovy throws a VerifyError here:

      java.lang.VerifyError: (class: Foo, method: <clinit> signature: ()V) Unable to pop operand off an empty stack

      Attachments

        Activity

          People

            Unassigned Unassigned
            pniederw Peter Niederwieser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: