You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by danielsun1106 <gi...@git.apache.org> on 2018/04/26 08:43:30 UTC

[GitHub] groovy pull request #691: Support java-like array

GitHub user danielsun1106 opened a pull request:

    https://github.com/apache/groovy/pull/691

    Support java-like array

    ## Background
    In order to improve the compatibility with Java(Copy & Paste), Java array is one of features widely applied in Java projects. The PR will make Groovy support java-like array. Here are [some tests](https://github.com/danielsun1106/groovy/blob/f20deb8bd6a1a90a4bfee8458e13438f7adf3732/subprojects/parser-antlr4/src/test/resources/core/Array_02x.groovy) for reference.
    
    ## Known breaking changes
    ### 1. `Closure` array
    #### Original
      ```
    Closure[] y = { {-> 1 + 1 } }
    assert y[0].call().call() == 2
      ```
    #### Current
      ```
    Closure[] y = { {-> 1 + 1 } }
    assert y[0].call() == 2
      ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/danielsun1106/groovy java-array

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/691.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #691
    
----
commit f20deb8bd6a1a90a4bfee8458e13438f7adf3732
Author: Daniel Sun <re...@...>
Date:   2018-04-26T07:59:08Z

    Support java-like array

----


---

[GitHub] groovy pull request #691: GROOVY-8561: Support java-like array

Posted by danielsun1106 <gi...@git.apache.org>.
Github user danielsun1106 closed the pull request at:

    https://github.com/apache/groovy/pull/691


---