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

ASF GitHub Bot commented on GROOVY-11676:
-----------------------------------------

paulk-asert commented on PR #2232:
URL: https://github.com/apache/groovy/pull/2232#issuecomment-2908353260

   +1




> Method reference using class name results in bogus error message
> ----------------------------------------------------------------
>
>                 Key: GROOVY-11676
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11676
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 4.0.26
>            Reporter: Christopher Smith
>            Assignee: Eric Milles
>            Priority: Minor
>
> I am writing a processing pipeline using {{with}} as a map-step. Since 
> {{with}} still does not accept {{{}Function{}}}, I am using method 
> references. I had a functional pipeline like this:
> {code:groovy}
> gremlin.V() /* stuff */
>   .with(Queries.&whoamiTraversal)
>   .with(Queries.&processTraversal)
> {code}
> This worked correctly when the methods were static. However, I changed 
> {{processTraversal}} to be a non-static method, and I should have changed the 
> invocation to {{this.&processTraversal}}. Instead, the STC did not complain, 
> and I received a runtime error 
> {code}
> groovy.lang.MissingMethodException: No signature of method: 
> org.codehaus.groovy.runtime.MethodClosure.processTraversal() is applicable 
> for argument types: ...
> {code}
> Instead of pointing at {{MethodClosure}}, the error message should indicate 
> where the actual problem is.



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

Reply via email to