[
https://issues.apache.org/jira/browse/GROOVY-12520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18132171#comment-18132171
]
ASF GitHub Bot commented on GROOVY-12520:
-----------------------------------------
codeconsole commented on PR #3046:
URL: https://github.com/apache/groovy/pull/3046#issuecomment-6408502478
The two failed jobs are unrelated to this change:
- `additional (24)`: `LanguageQualityTest.dotCompletionListsReceiverMembers`
in `groovy-lsp` hit GROOVY-12532, a race in the shared `ErrorCollector` under
parallel parsing, which happens on master too.
- `lts (17, ubuntu-latest)`:
`ParallelCollectionTest.testEachParallelRunsConcurrently` timed out at its
5-second barrier. The same job passed on #3045, #3047 and #3048.
Could someone with the rights rerun the two failed jobs?
> super.x calls getX() instead of isX() when the class overrides isX()
> --------------------------------------------------------------------
>
> Key: GROOVY-12520
> URL: https://issues.apache.org/jira/browse/GROOVY-12520
> Project: Groovy
> Issue Type: Bug
> Components: groovy-runtime
> Affects Versions: 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> When a class declares both {{isX()}} and {{getX()}}, Groovy reads the
> property {{x}} through {{isX()}} (GROOVY-10133), also through {{super}}. If
> the subclass overrides {{isX()}} or declares a {{boolean x}} property,
> dynamic Groovy and {{@TypeChecked}} read {{super.x}} through the superclass's
> {{getX()}} instead:
> {code:groovy}
> class C {
> boolean isX() { true }
> boolean getX() { false }
> }
> class D extends C {
> boolean isX() { false }
> boolean test() { super.x }
> }
> class E extends C {
> boolean x
> boolean test() { super.x }
> }
> assert new D().test() // fails: false
> assert new E().test() // fails: false
> {code}
> {{@CompileStatic}} returns {{true}} for both, and so does dynamic Groovy
> 4.0.33. 5.0.0, 5.0.8, 6.0.0 and master return {{false}}.
> For {{super}}, the getter of an overridden method is the MOP method
> {{super$2$isX}}, and the check that keeps {{isX()}} over {{getX()}} only
> accepts a method whose name starts with "is", so {{getX()}} replaces it.
> Expected: {{super.x}} calls {{C.isX()}} in every mode.
> PR: https://github.com/apache/groovy/pull/3046
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)