[ 
https://issues.apache.org/jira/browse/GROOVY-10063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Milles updated GROOVY-10063:
---------------------------------
    Description: 
Follow up from GROOVY-8223 and GROOVY-8887.  Consider the following:
{code:groovy}
static Tuple2<String,Integer> make() {
  Tuple.tuple('answer', 42)
}
@groovy.transform.CompileStatic
void test() {
  def (String string, Integer number) = make()
  println string
  println number
}
test()
{code}

Destructuring of tuple fails for static method call expression.

  was:
Follow up from GROOVY-8223 and GROOVY-8887.  Consider the following:
{code:groovy}
static Tuple2<String,Integer> make() {
  Tuple.tuple('answer', 42)
}
@groovy.transform.CompileStatic
void test() {
  // Fixed in Groovy 3? Backport to Groovy 2.5?
  def (String string, Integer number) = make();
  println string
  println number
}
test()
{code}

Destructuring of tuple fails for static method call expression.


> STC: multiple-assignment from tuple-bearing static method
> ---------------------------------------------------------
>
>                 Key: GROOVY-10063
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10063
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Minor
>
> Follow up from GROOVY-8223 and GROOVY-8887.  Consider the following:
> {code:groovy}
> static Tuple2<String,Integer> make() {
>   Tuple.tuple('answer', 42)
> }
> @groovy.transform.CompileStatic
> void test() {
>   def (String string, Integer number) = make()
>   println string
>   println number
> }
> test()
> {code}
> Destructuring of tuple fails for static method call expression.



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

Reply via email to