You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2020/07/01 22:27:00 UTC

[jira] [Assigned] (GROOVY-4945) Incorrect "Possible solutions" when calling a method on super in a non-derived class

     [ https://issues.apache.org/jira/browse/GROOVY-4945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Milles reassigned GROOVY-4945:
-----------------------------------

    Assignee: Eric Milles

> Incorrect "Possible solutions" when calling a method on super in a non-derived class
> ------------------------------------------------------------------------------------
>
>                 Key: GROOVY-4945
>                 URL: https://issues.apache.org/jira/browse/GROOVY-4945
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-runtime
>    Affects Versions: 1.7.10, 1.8.1, 2.4.0-rc-1
>            Reporter: Rene Scheibe
>            Assignee: Eric Milles
>            Priority: Minor
>
> h3. Calling an instance method on super in a non-derived class.
> {code}
> class T { void m() { super.m() } }
> new T().m() 
> {code}
> This results in the below exception.
> {noformat}
> ERROR groovy.lang.MissingMethodException:
> No signature of method: T.m() is applicable for argument types: () values: []
> Possible solutions: m(), is(java.lang.Object), dump(), any(), any(groovy.lang.Closure), use([Ljava.lang.Object;)
> {noformat}
> This can be quite confusion as the called method on super is also listed in the possible solutions. The error message should be a different one.
> h3. Calling a static method on super in a non-derived class.
> {code}
> class T { static void m() { super.m() } }
> T.m() 
> {code}
> This results in the below stack overflow.
> {noformat}
> ERROR java.lang.StackOverflowError:
> null
>         at T.$getCallSiteArray (groovysh_evaluate)
>         at T.m (groovysh_evaluate)
>         at T.m (groovysh_evaluate:2)
>         at T.m (groovysh_evaluate:2)
>         ...
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)