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 2022/04/25 15:24:00 UTC

[jira] [Comment Edited] (GROOVY-10592) Java static interface methods cannot be located using property notation in dynamic context

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

Eric Milles edited comment on GROOVY-10592 at 4/25/22 3:23 PM:
---------------------------------------------------------------

https://github.com/apache/groovy/commit/de777e60c32d325cb25fe60efa14031d75e457a7
https://github.com/apache/groovy/commit/8fa6d43a6515e7ddfc419f259d247254ddbd72c2


was (Author: emilles):
https://github.com/apache/groovy/commit/de777e60c32d325cb25fe60efa14031d75e457a7

> Java static interface methods cannot be located using property notation in dynamic context
> ------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-10592
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10592
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.5.16, 3.0.10, 4.0.2
>            Reporter: Leonard Brünings
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 5.0.0-alpha-1
>
>
> Extracted from GROOVY-10590
> {code:java|title=SomeInterface.java}
> public interface SomeInterface {
>     static String getSomeVersion() {
>         return "1.0";
>     }
> }
> {code}
> {code:groovy|title=Reproducer.groovy}
> import spock.lang.Specification
> class Reproducer extends Specification {
>     def "someLibraryMethod returns true"() {
>         expect:
>         SomeInterface.someVersion == "1.0"
>     }
> }
> {code}
> fails with
> {noformat}
> SomeInterface.someVersion == "1.0"
> |             |
> |             groovy.lang.MissingPropertyException: No such property: someVersion for class: reproducer.SomeInterface
> |             	at reproducer.Reproducer.someLibraryMethod returns true(Reproducer.groovy:11)
> interface reproducer.SomeInterface
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)