[ 
https://issues.apache.org/jira/browse/GROOVY-11492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18134323#comment-18134323
 ] 

ASF GitHub Bot commented on GROOVY-11492:
-----------------------------------------

eric-milles commented on PR #3054:
URL: https://github.com/apache/groovy/pull/3054#issuecomment-6503181329

   I added a test case for the various behavior changes discussed above.  
https://github.com/apache/groovy/pull/3054/changes/00299685398f0fa03a7e51bf5deb0b80911f23d3
  The silent failures appear to be restricted to Closure/SAM expression 
evaluation with the intent of coercion.  I don't have an immediate plan to 
single those out for alternate parsing or some compiler warning or something.




> Java compatibility: array initializers without "new Type[]"
> -----------------------------------------------------------
>
>                 Key: GROOVY-11492
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11492
>             Project: Groovy
>          Issue Type: Improvement
>          Components: parser-antlr4
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>              Labels: arrays
>
> There are a few cases where bare array initializers are not yet supported:
> # {{int[][] array = \{ \{1,2\}, \{3,4\} \};}}
> # {{@Target(\{ ElementType.FIELD, ElementType.METHOD \})}}
> # {code:groovy}@interface A {
>   String[] strings() default {}
> }
> {code}
> These were implemented as part of [1] but the PR was closed.  It may be worth 
> looking back over what was done and re-implementing one or more of these 
> cases.  It was noted that {{Closure[] array = \{\};}} is one of the edge 
> cases that leads to ambiguity.
> [1] https://github.com/apache/groovy/pull/691



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to