You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Shil Sinha (JIRA)" <ji...@apache.org> on 2015/11/28 18:54:10 UTC

[jira] [Created] (GROOVY-7694) Results of spread safe method calls should be stored in temporary variables

Shil Sinha created GROOVY-7694:
----------------------------------

             Summary: Results of spread safe method calls should be stored in temporary variables
                 Key: GROOVY-7694
                 URL: https://issues.apache.org/jira/browse/GROOVY-7694
             Project: Groovy
          Issue Type: Bug
          Components: Static compilation
    Affects Versions: 2.4.5
            Reporter: Shil Sinha
            Assignee: Shil Sinha
            Priority: Minor


Currently, the following code throws an NPE during class generation because the static compiler creates variables of the form "spreadresultX" to store the results of spread safe method calls. See GROOVY-7656 for the original discussion.

{code}
@groovy.transform.CompileStatic
static void test(String a, String b, List spreadresult1) {
    [a, b]*.length()
}
test('a', 'b', [])
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)