groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tinne (JIRA)" <>
Subject [jira] [Created] (GROOVY-7935) Right side of assignment - remove parens or not?
Date Mon, 12 Sep 2016 19:28:22 GMT
tinne created GROOVY-7935:

             Summary: Right side of assignment - remove parens or not?
                 Key: GROOVY-7935
             Project: Groovy
          Issue Type: Bug
          Components: Documentation
         Environment:, release 2.4.7
            Reporter: tinne
            Priority: Minor

The Groovy [style guide]( says, "...  Groovy doesn’t
allow you to remove parentheses. [...] for nested method calls or on the right-hand side of
an assignment, you can’t omit them there."

Then, a code fragment is given, where just this works.

def foo(n) { n }

println foo 1 // won't work
def m = foo 1

Further more, I could not find any examples, where this would not work, neither with comma
separated parameter lists nor with infix computations nor closures.

So I guess it is just a documentation bug and right-hand side parens removal support has been

This message was sent by Atlassian JIRA

View raw message