Any plans to fix #GROOVY-5776

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Any plans to fix #GROOVY-5776

Behrang Saeedzadeh
I am just hit by this bug (or something like that): http://jira.codehaus.org/browse/GROOVY-5776

abstract class AbstractService {

  static final String FOO = "FOO"

}

class MyService extends AbstractService {

 // some code

}

Error:

| Error Fatal error during compilation org.apache.tools.ant.BuildException: BUG! exception in phase 'class generation' in source unit '/app/grails-app/services/foo/bar/MyService.groovy' Trying to access private constant field [foo.bar.AbstractService#FOO] from inner class (Use --stacktrace to see the full trace)


Cheers,
Behrang Saeedzadeh
http://www.behrang.org
Reply | Threaded
Open this post in threaded view
|

Re: Any plans to fix #GROOVY-5776

Behrang Saeedzadeh
Looks like explicitly declaring the constant as public fixes it. Still surprising though.

Cheers,
Behrang Saeedzadeh
http://www.behrang.org


On Tue, Jan 22, 2013 at 3:20 PM, Behrang Saeedzadeh <[hidden email]> wrote:
I am just hit by this bug (or something like that): http://jira.codehaus.org/browse/GROOVY-5776

abstract class AbstractService {

  static final String FOO = "FOO"

}

class MyService extends AbstractService {

 // some code

}

Error:

| Error Fatal error during compilation org.apache.tools.ant.BuildException: BUG! exception in phase 'class generation' in source unit '/app/grails-app/services/foo/bar/MyService.groovy' Trying to access private constant field [foo.bar.AbstractService#FOO] from inner class (Use --stacktrace to see the full trace)


Cheers,
Behrang Saeedzadeh
http://www.behrang.org