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 2021/10/05 15:57:00 UTC

[jira] [Comment Edited] (GROOVY-6324) Cannot call closure like a method in type checked mode

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

Eric Milles edited comment on GROOVY-6324 at 10/5/21, 3:56 PM:
---------------------------------------------------------------

See also GROOVY-5881.  Currently {{VariableScopeVisitor}} transforms "var()" to "var.call()".  This is not done for property object expression method call like "car.model()".


was (Author: emilles):
See also GROOVY-5881 and GROOVY-6324.  Currently {{VariableScopeVisitor}} transforms "var()" to "var.call()".  This is not done for property object expression method call like "car.model()".

> Cannot call closure like a method in type checked mode
> ------------------------------------------------------
>
>                 Key: GROOVY-6324
>                 URL: https://issues.apache.org/jira/browse/GROOVY-6324
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>    Affects Versions: 2.2.0-beta-1, 2.3.0, 2.4.0-rc-1
>            Reporter: Peter Niederwieser
>            Priority: Major
>
> {{Closure closure = ...; closure()}} doesn't work in type-checked mode. Instead, one has to use {{closure.call()}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)