Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6-rc-2, 1.6-rc-3
-
Fix Version/s: 1.6.1, 1.7-beta-1
-
Component/s: None
-
Labels:None
-
Environment:JDK 1.6, Windows
-
Number of attachments :
Description
see the example:
public class Foo { static Object foo(Object obj) { println "Foo.foo()" return obj; } } public class Bar extends Foo{ static Object bar(Object obj) { println "Bar.bar()" return obj; } } def obj = new Object() use(Foo){ obj.foo() } use(Bar){ obj.bar() obj.foo() // Caught: groovy.lang.MissingMethodException: }
Exception
Caught: groovy.lang.MissingMethodException: No signature of method: java.lang.Object.foo() is applicable for argument types: () values: [] at test$_run_closure2.doCall(test.groovy:10) at test$_run_closure2.doCall(test.groovy) at test.run(test.groovy:8)
there was no problem in Groovy 1.5.x