[jira] [Commented] (GROOVY-8633) MME on Class receiver via method closure

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (GROOVY-8633) MME on Class receiver via method closure

JIRA jira@apache.org

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

Eric Milles commented on GROOVY-8633:
-------------------------------------

I think this example is similar to {{def ABC = ['a','b','c'].collect(String.&toUpperCase)}}, which has not been supported in any Groovy release.  I think the JIRA ticket for implementing Lambdas mentions this gap/issue as well.

> MME on Class receiver via method closure
> ----------------------------------------
>
>                 Key: GROOVY-8633
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8633
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 3.0.0-alpha-2, 2.5.0
>            Reporter: Daniil Ovchinnikov
>            Priority: Major
>
> {code}
> def c = Integer
> println c.toGenericString() // public final class java.lang.Integer
> def cl = c.&toGenericString
> println cl() // groovy.lang.MissingMethodException: No signature of method: java.lang.Integer.toGenericString() is applicable for argument types: () values: []
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)