[ 
https://issues.apache.org/jira/browse/GROOVY-10764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608006#comment-17608006
 ] 

Eric Milles commented on GROOVY-10764:
--------------------------------------

It was required to stop carrying these methods over to implementing classes. I 
can dig up the ticket if you need it. 

> Static interface methods are not callable on implementing class
> ---------------------------------------------------------------
>
>                 Key: GROOVY-10764
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10764
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 4.0.5
>            Reporter: Tim Yates
>            Assignee: Eric Milles
>            Priority: Major
>
> This is another issue that may be working as expected.  I searched, but 
> couldn't find anything...
> Given a Java interface:
> {code:java}
> public interface Interface {
>     static void woo() {
>         System.out.println("woo");
>     }
> } {code}
> And a Java class which implements it
> {code:java}
> public class Concrete implements Interface {
> } {code}
> In Groovy 4.0.5, it is no longer possible to call the static method on the 
> implementing class.  ie:
> This groovy:
> {code:java}
> Concrete.woo() {code}
> Throws
> {code:java}
> Caused by: groovy.lang.MissingMethodException: No signature of method: static 
> groovybug.Concrete.woo() is applicable for argument types: () values: []
> Possible solutions: wait(), any(), wait(long), any(groovy.lang.Closure), 
> is(java.lang.Object), tap(groovy.lang.Closure)
>     at app//groovybug.Main.run(Main.groovy:6) {code}
> Wheras in Groovy 3.x (and Java) it is valid.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to