Details
-
Sub-task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.7.4
-
None
-
None
Description
If a class with static methods is mixed in another class, the static methods are not available as static methods.
Furthermore a strange behaviour occurs - they are available as instance methods and when once called as instance methods they also get available as static methods - see the code below.
class Base { def instanceMethod() { println 'instance method' } static staticMethod() { println 'static method' } } class T1 {} class T2 {} T1.mixin Base T2.mixin Base t1 = new T1() t1.instanceMethod() t1.staticMethod() T1.staticMethod() // somehow working, after callling it as an instance method before - thats' strange!!! t2 = new T2() t2.instanceMethod() T2.staticMethod() // not working: Caught: groovy.lang.MissingMethodException: No signature of method: static T2.staticMethod() is applicable for argument types: () values