Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.7.10, 1.8.1, 2.4.0-rc-1
-
None
Description
Calling an instance method on super in a non-derived class.
class T { void m() { super.m() } } new T().m()
This results in the below exception.
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;)
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.
Calling a static method on super in a non-derived class.
class T { static void m() { super.m() } } T.m()
This results in the below stack overflow.
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) ...
Attachments
Issue Links
- is related to
-
GROOVY-9615 super.method() can trigger method on outer class in case of missing method
- Closed