[
https://issues.apache.org/jira/browse/GROOVY-11613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles resolved GROOVY-11613.
----------------------------------
Fix Version/s: 4.0.27
Resolution: Fixed
> Cannot call on outerclass's default method if the inner class extends that
> outerclass
> -------------------------------------------------------------------------------------
>
> Key: GROOVY-11613
> URL: https://issues.apache.org/jira/browse/GROOVY-11613
> Project: Groovy
> Issue Type: Bug
> Components: Compiler, Static compilation
> Affects Versions: 4.0.24
> Reporter: Saravanan
> Assignee: Eric Milles
> Priority: Minor
> Fix For: 4.0.27
>
>
>
> {code:java}
> public interface Interfaces {
> default String myThing() {
> return "BLAHG"
> }
> // Groovy fails with Cannot have non-static inner class
> // inside a trait (com.org.interfaces.Interfaces$Inner)
> // Does not fare better if we add static. Works with abstract classes
> public interface Inner extends Interfaces {
> default String otherThing() {
> return myThing()
> }
> }
> } {code}
> The first error I get is that inner classes in a trait cannot be non static.
> But if I make it static, I get a null pointer exception looking for the trait
> helper class (because the trait's helper class was not created yet when
> parsing the inner class)
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)