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

Groovy does not support abstract methods in enums

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.6
    • None
    • None
    • None
    • Mac osX 10.5, Java 6

    Description

      enum MyEnum {
          a {
              void something() {}
          }
          
          abstract void something()
      }
      
      MyEnum.a.something()
      

      code above should work (if I extrapolate from Java) but brings in Groovy console:
      1 compilation error:
      Unknown type: OBJBLOCK at line: 2 column: 7. File: ConsoleScript10 at

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              johanneslink Johannes Link
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: