[
https://issues.apache.org/jira/browse/GROOVY-11492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18133087#comment-18133087
]
ASF GitHub Bot commented on GROOVY-11492:
-----------------------------------------
testlens-app[bot] commented on PR #3054:
URL: https://github.com/apache/groovy/pull/3054#issuecomment-6448903708
## 🚨 TestLens detected 3 failed tests 🚨
### Test Summary
> [!TIP]
> Inspect all details with the [TestLens
CLI](https://testlens.app/docs/features/cli): `testlens pr 3054`
#### [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/40546038245/job/122336809559?pr=3054)
> :test
| Test | Runs | Flakiness |
|---|---|--:|
| ParserNegativeSyntaxTest > error alternative - Missing \"\)\" 3\(\) | ❌ |
0% 🟢 |
| ParserNegativeSyntaxTest > groovy core - Parentheses\(\) | ❌ | 0% 🟢 |
| ParserNegativeSyntaxTest > missing close paren in method header\(\) | ❌ |
0% 🟢 |
🏷️ Commit: ba0fbfe2c819af0f105487b2f8ce26db6a9e4027
▶️ Tests: 51056 executed
🟡 Checks: 6/30 completed
### Test Failures
<details><summary><strong>ParserNegativeSyntaxTest > error alternative -
Missing ")" 3()</strong> (:test in <a
href="https://github.com/apache/groovy/actions/runs/40546038245/job/122336809559?pr=3054">Build
and test / lts (17, macos-latest)</a>)</summary>
```
org.opentest4j.AssertionFailedError: expected: <startup failed:
test.groovy: 1: Missing ')' @ line 1, column 8.
def m( {
^
1 error
> but was: <startup failed:
test.groovy: 2: Missing ')' @ line 2, column 2.
}
^
1 error
>
at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1199)
at
org.apache.groovy.parser.antlr4.TestUtils.expectParseError(TestUtils.groovy:191)
at org.apache.groovy.parser.antlr4.ParserNegativeSyntaxTest.error
alternative - Missing ")" 3(ParserNegativeSyntaxTest.groovy:3006)
```
|expected|actual|
|---|---|
|startup failed:|startup failed:|
|test.groovy: <s>1</s>: Missing \'\)\' <span>@</span> line <s>1</s>, column
<s>8</s>.|test.groovy: <b>2</b>: Missing \'\)\' <span>@</span> line <b>2</b>,
column <b>2</b>.|
| <s>def m\( \{| <b>\}|
| </s>\^| </b>\^|
|||
|1 error|1 error|
</details>
<details><summary><strong>ParserNegativeSyntaxTest > groovy core -
Parentheses()</strong> (:test in <a
href="https://github.com/apache/groovy/actions/runs/40546038245/job/122336809559?pr=3054">Build
and test / lts (17, macos-latest)</a>)</summary>
```
org.opentest4j.AssertionFailedError: expected: <startup failed:
test.groovy: 1: Missing ')' @ line 1, column 8.
def a( {
^
1 error
> but was: <startup failed:
test.groovy: 2: Missing ')' @ line 2, column 2.
}
^
1 error
>
at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1199)
at
org.apache.groovy.parser.antlr4.TestUtils.expectParseError(TestUtils.groovy:191)
at org.apache.groovy.parser.antlr4.ParserNegativeSyntaxTest.groovy core
- Parentheses(ParserNegativeSyntaxTest.groovy:1555)
```
|expected|actual|
|---|---|
|startup failed:|startup failed:|
|test.groovy: <s>1</s>: Missing \'\)\' <span>@</span> line <s>1</s>, column
<s>8</s>.|test.groovy: <b>2</b>: Missing \'\)\' <span>@</span> line <b>2</b>,
column <b>2</b>.|
| <s>def a\( \{| <b>\}|
| </s>\^| </b>\^|
|||
|1 error|1 error|
</details>
<details><summary><strong>ParserNegativeSyntaxTest > missing close paren in
method header()</strong> (:test in <a
href="https://github.com/apache/groovy/actions/runs/40546038245/job/122336809559?pr=3054">Build
and test / lts (17, macos-latest)</a>)</summary>
```
org.opentest4j.AssertionFailedError: expected: <startup failed:
test.groovy: 1: Missing ')' @ line 1, column 8.
def m( {
^
1 error
> but was: <startup failed:
test.groovy: 2: Missing ')' @ line 2, column 2.
}
^
1 error
>
at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1199)
at
org.apache.groovy.parser.antlr4.TestUtils.expectParseError(TestUtils.groovy:191)
at org.apache.groovy.parser.antlr4.ParserNegativeSyntaxTest.missing
close paren in method header(ParserNegativeSyntaxTest.groovy:1277)
```
|expected|actual|
|---|---|
|startup failed:|startup failed:|
|test.groovy: <s>1</s>: Missing \'\)\' <span>@</span> line <s>1</s>, column
<s>8</s>.|test.groovy: <b>2</b>: Missing \'\)\' <span>@</span> line <b>2</b>,
column <b>2</b>.|
| <s>def m\( \{| <b>\}|
| </s>\^| </b>\^|
|||
|1 error|1 error|
</details>
### Rerun Controls
> [!NOTE]
> Checks are currently running using the configuration below.
Select tests to mute in this pull request:
🔲 ParserNegativeSyntaxTest > error alternative - Missing \"\)\" 3\(\) <!
> 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)