You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/07/08 10:18:33 UTC

[groovy] branch GROOVY_3_0_X updated (23cb224 -> 98594ba)

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a change to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git.


    from 23cb224  better name for action
     new 2bb028b  correct heading level
     new 98594ba  improve doco wording

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/spec/doc/core-syntax.adoc | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)


[groovy] 01/02: correct heading level

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 2bb028b5784cc1586f9400045a1d87e315b2820a
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Jul 8 20:06:37 2020 +1000

    correct heading level
---
 src/spec/doc/core-syntax.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/spec/doc/core-syntax.adoc b/src/spec/doc/core-syntax.adoc
index c1a67c8..6ee0790 100644
--- a/src/spec/doc/core-syntax.adoc
+++ b/src/spec/doc/core-syntax.adoc
@@ -1102,7 +1102,7 @@ include::{projectdir}/src/spec/test/SyntaxTest.groovy[tags=array_3,indent=0]
 Java's array initializer notation is not supported by Groovy, 
 as the curly braces can be misinterpreted with the notation of Groovy closures.
 
-==== Java-style array initialization
+=== Java-style array initialization
 
 Groovy has always supported literal list/array definitions using square brackets
 and has avoided Java-style curly braces so as not to conflict with closure definitions.


[groovy] 02/02: improve doco wording

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 98594ba60521253f1fe6f2bce051a0581ebccc2a
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Jul 8 20:14:06 2020 +1000

    improve doco wording
---
 src/spec/doc/core-syntax.adoc | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/spec/doc/core-syntax.adoc b/src/spec/doc/core-syntax.adoc
index 6ee0790..3b2a75e 100644
--- a/src/spec/doc/core-syntax.adoc
+++ b/src/spec/doc/core-syntax.adoc
@@ -1098,16 +1098,13 @@ include::{projectdir}/src/spec/test/SyntaxTest.groovy[tags=array_3,indent=0]
 <1> Retrieve the first element of the array
 <2> Set the value of the third element of the array to a new value
 
-[NOTE]
-Java's array initializer notation is not supported by Groovy, 
-as the curly braces can be misinterpreted with the notation of Groovy closures.
-
 === Java-style array initialization
 
 Groovy has always supported literal list/array definitions using square brackets
 and has avoided Java-style curly braces so as not to conflict with closure definitions.
 In the case where the curly braces come immediately after an array type declaration however,
-there is no ambiguity with closure definitions, so the Java style is now also supported.
+there is no ambiguity with closure definitions,
+so Groovy 3 and above support that variant of the Java array initialization expression.
 
 Examples: