Eric Milles created GROOVY-10636:
------------------------------------

             Summary: STC: closure array or varargs parameter not type-checked 
properly
                 Key: GROOVY-10636
                 URL: https://issues.apache.org/jira/browse/GROOVY-10636
             Project: Groovy
          Issue Type: Bug
          Components: Static Type Checker
            Reporter: Eric Milles
            Assignee: Eric Milles


Consider the following:
{code:groovy}
def m(Closure<Number>... closures) {
  closures*.call().sum()
}
@groovy.transform.TypeChecked
void test() {
  print m({->1},{->'2'})
}
{code}

No error is given for the improper String return type.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to