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)
Signup
groovy
  • groovy
  • GROOVY-3080 implementation for inner classes in G...
  • GROOVY-69

support inner classes (or at least nested classes)

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.7-rc-1
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

This causes OutOfMemoryException...

class A {
class B {}
}

we should fix it

Issue Links

is depended upon by

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.

Task - A task that needs to be done. GROOVY-763 implement java parts

  • Major - Major loss of function.
  • 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
Chris Poirier added a comment - 07/Mar/04 1:11 AM

The parser now does support inner classes, but ASTs (and classes) are not being generated from the CSTs....

Show
Chris Poirier added a comment - 07/Mar/04 1:11 AM The parser now does support inner classes, but ASTs (and classes) are not being generated from the CSTs....
Hide
Permalink
blackdrag blackdrag added a comment - 04/Mar/05 9:32 AM

support for inner classes

Show
blackdrag blackdrag added a comment - 04/Mar/05 9:32 AM support for inner classes
Hide
Permalink
Daniel.Sun added a comment - 24/Dec/07 8:09 AM

If possible, please support the anonymous inner class too.

Thanks.

Show
Daniel.Sun added a comment - 24/Dec/07 8:09 AM If possible, please support the anonymous inner class too. Thanks.
Hide
Permalink
David Smiley added a comment - 24/Mar/08 12:03 AM

I'm really surprised inner classes (anonymous or not) are not supported in Groovy. I like to think of Groovy as doing what Java does and more but that definitely not true. Inner classes are there for convenience. If anything, Groovy is about convenience to quickly get the job done, often quite succinctly... so it's surprising to see that Groovy still doesn't do this yet. Several times I've wanted to create a quick anonymous class because I've got to override some method or another but instead I have to go create a top level class and throw it at the bottom of the current class. Pretty awkward. It's ironic that Java introduced this convenience back in version 1.1 and somehow Groovy doesn't have this yet.

Show
David Smiley added a comment - 24/Mar/08 12:03 AM I'm really surprised inner classes (anonymous or not) are not supported in Groovy. I like to think of Groovy as doing what Java does and more but that definitely not true. Inner classes are there for convenience. If anything, Groovy is about convenience to quickly get the job done, often quite succinctly... so it's surprising to see that Groovy still doesn't do this yet. Several times I've wanted to create a quick anonymous class because I've got to override some method or another but instead I have to go create a top level class and throw it at the bottom of the current class. Pretty awkward. It's ironic that Java introduced this convenience back in version 1.1 and somehow Groovy doesn't have this yet.
Hide
Permalink
Guillaume Laforge added a comment - 24/Mar/08 4:09 AM

It's already on the Groovy roadmap.

Show
Guillaume Laforge added a comment - 24/Mar/08 4:09 AM It's already on the Groovy roadmap.
Hide
Permalink
blackdrag blackdrag added a comment - 24/Mar/08 8:26 AM

for David....

In Groovy it is a bit more difficult to realize inner classes in its full extend, because of the MOP. in most cases you can use closures instead, so it is not that awful. but that does not solve all cases. We are aware of that and inner classes are on the agenda... we just need to define it completely first and do not loose sight of other things we want to have too.

Show
blackdrag blackdrag added a comment - 24/Mar/08 8:26 AM for David.... In Groovy it is a bit more difficult to realize inner classes in its full extend, because of the MOP. in most cases you can use closures instead, so it is not that awful. but that does not solve all cases. We are aware of that and inner classes are on the agenda... we just need to define it completely first and do not loose sight of other things we want to have too.
Hide
Permalink
Olivier Mengué added a comment - 19/Jun/08 12:52 PM

See GROOVY-1328 which is also about multiple classes defined in one source file (but not inner). Since declaring multiple classes in one script gives an unusable script, one can not even create manually inner classes.
We're back to Java 1.1 days...

Show
Olivier Mengué added a comment - 19/Jun/08 12:52 PM See GROOVY-1328 which is also about multiple classes defined in one source file (but not inner). Since declaring multiple classes in one script gives an unusable script, one can not even create manually inner classes. We're back to Java 1.1 days...
Hide
Permalink
blackdrag blackdrag added a comment - 26/Jun/08 8:41 AM

Olivier... first, the feature is targeted for 1.8, so just wait a little and it is done. Second, just putting multiple classes in one file doesn't make the file unusable. We are here to discuss the facts if possible.

Show
blackdrag blackdrag added a comment - 26/Jun/08 8:41 AM Olivier... first, the feature is targeted for 1.8, so just wait a little and it is done. Second, just putting multiple classes in one file doesn't make the file unusable. We are here to discuss the facts if possible.
Hide
Permalink
blackdrag blackdrag added a comment - 25/Nov/09 4:21 AM

fixed

Show
blackdrag blackdrag added a comment - 25/Nov/09 4:21 AM fixed

People

  • Assignee:
    blackdrag blackdrag
    Reporter:
    james strachan
Vote (10)
Watch (6)

Dates

  • Created:
    10/Dec/03 12:08 AM
    Updated:
    25/Nov/09 4:21 AM
    Resolved:
    25/Nov/09 4:21 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.