Eric Milles created GROOVY-10072:
------------------------------------

             Summary: CLONE - SC: closure with default argument(s)
                 Key: GROOVY-10072
                 URL: https://issues.apache.org/jira/browse/GROOVY-10072
             Project: Groovy
          Issue Type: Bug
          Components: Static Type Checker
    Affects Versions: 2.5.14, 3.0.8, 4.0.0-alpha-3
            Reporter: Eric Milles
            Assignee: Eric Milles


Consider the following:
{code:groovy}
void test() {
  def f = { p = 'foo' -> return p }
  assert f('bar') == 'bar'
  assert f() == 'foo'

  def g = { ... zeroOrMore -> return 'foo' + zeroOrMore }
  assert f('bar') == 'foo[bar]'
  assert g() == 'foo[]'
}
test()
{code}

Both fail to compile successfully.



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

Reply via email to