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-3178

Dont support method override in enum

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 1.5.6
  • Fix Version/s: None
  • Component/s: Compiler
  • Labels:
    None

Description

When I override a method in enum, I get a error:

MultipleCompilationErrorsException

I atached a example.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. File
    Type.groovy
    30/Nov/08 2:33 PM
    0.3 kB
    Maxwell Chiareli

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

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
blackdrag blackdrag added a comment - 01/Dec/08 8:08 AM

groovy enums do not yet support the inner classes you would need to realize this.

Show
blackdrag blackdrag added a comment - 01/Dec/08 8:08 AM groovy enums do not yet support the inner classes you would need to realize this.
Hide
Permalink
Roshan Dawrani added a comment - 20/Dec/08 11:22 PM

The class like body for enum constants that the groovy grammar allows, as in:

public enum Type {
    LIKE {   
                String getValue() {
                    return "test"
                }
	    }
}

is not supported fully in the groovy implementation, is it?

If not yet, is it part of the plans of any near-future release?

Show
Roshan Dawrani added a comment - 20/Dec/08 11:22 PM The class like body for enum constants that the groovy grammar allows, as in:
public enum Type {
    LIKE {   
                String getValue() {
                    return "test"
                }
	    }
}
is not supported fully in the groovy implementation, is it? If not yet, is it part of the plans of any near-future release?
Hide
Permalink
Guillaume Laforge added a comment - 21/Dec/08 2:58 AM

We should support enums as fully as possible, yes.

Show
Guillaume Laforge added a comment - 21/Dec/08 2:58 AM We should support enums as fully as possible, yes.
Hide
Permalink
blackdrag blackdrag added a comment - 21/Dec/08 6:38 AM

this is a duplicate for GROOVY-2443

Show
blackdrag blackdrag added a comment - 21/Dec/08 6:38 AM this is a duplicate for GROOVY-2443

People

  • Assignee:
    blackdrag blackdrag
    Reporter:
    Maxwell Chiareli
Vote (0)
Watch (0)

Dates

  • Created:
    30/Nov/08 2:33 PM
    Updated:
    21/Dec/08 6:39 AM
    Resolved:
    21/Dec/08 6:38 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.