jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • groovy
  • GROOVY-3408

Groovy does not support abstract methods in enums

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 1.6
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    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

Issue Links

duplicates

Sub-task - The sub-task of the issue GROOVY-2443 Enum does not support instance (value) specific methods

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
There are no comments yet on this issue.

People

  • Assignee:
    Unassigned
    Reporter:
    Johannes Link
Vote (0)
Watch (0)

Dates

  • Created:
    13/Mar/09 4:21 PM
    Updated:
    14/Mar/09 6:50 AM
    Resolved:
    14/Mar/09 6:50 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.