[
https://issues.apache.org/jira/browse/GROOVY-12594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140686#comment-18140686
]
ASF GitHub Bot commented on GROOVY-12594:
-----------------------------------------
testlens-app[bot] commented on PR #3121:
URL: https://github.com/apache/groovy/pull/3121#issuecomment-6720375114
## 🚨 Jobs failed without executing tests 🚨
### Failed Jobs without Test Failures
❌ [Build and test / lts \(17,
ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42471407609/job/128702782697?pr=3121)
❌ [Build and test / lts \(25,
ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42471407609/job/128702782879?pr=3121)
❌ [Build and test for coverage /
test](https://github.com/apache/groovy/actions/runs/42471407666/job/128702782375?pr=3121)
❌ [Check licenses / test
\(ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42471407659/job/128702782161?pr=3121)
❌ [CodeQL / Analyze \(java,
21\)](https://github.com/apache/groovy/actions/runs/42471407667/job/128702782533?pr=3121)
❌ [Performance check /
test](https://github.com/apache/groovy/actions/runs/42471407694/job/128702782453?pr=3121)
❌ [jmh /
summary](https://github.com/apache/groovy/actions/runs/42471407722/job/128702897295?pr=3121)
❌ [jmh / test \(bench,
\\\\.bench\\\\.\)](https://github.com/apache/groovy/actions/runs/42471407722/job/128702783174?pr=3121)
❌ [jmh / test \(core-ag,
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42471407722/job/128702782903?pr=3121)
❌ [jmh / test \(core-hz,
\\\\.perf\\\\.[H-Z]\)](https://github.com/apache/groovy/actions/runs/42471407722/job/128702782863?pr=3121)
❌ [jmh / test \(grails-ad,
\\\\.perf\\\\.grails\\\\.[A-D]\)](https://github.com/apache/groovy/actions/runs/42471407722/job/128702783017?pr=3121)
❌ [jmh / test \(grails-ez,
\\\\.perf\\\\.grails\\\\.[E-Z]\)](https://github.com/apache/groovy/actions/runs/42471407722/job/128702782678?pr=3121)
❌ [jmh-classic /
summary](https://github.com/apache/groovy/actions/runs/42471407674/job/128702901513?pr=3121)
❌ [jmh-classic / test \(bench,
\\\\.bench\\\\.\)](https://github.com/apache/groovy/actions/runs/42471407674/job/128702782381?pr=3121)
❌ [jmh-classic / test \(core-ag,
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42471407674/job/128702782649?pr=3121)
❌ [jmh-classic / test \(core-hz,
\\\\.perf\\\\.[H-Z]\)](https://github.com/apache/groovy/actions/runs/42471407674/job/128702782624?pr=3121)
❌ [jmh-classic / test \(grails-ad,
\\\\.perf\\\\.grails\\\\.[A-D]\)](https://github.com/apache/groovy/actions/runs/42471407674/job/128702782712?pr=3121)
❌ [jmh-classic / test \(grails-ez,
\\\\.perf\\\\.grails\\\\.[E-Z]\)](https://github.com/apache/groovy/actions/runs/42471407674/job/128702782626?pr=3121)
🏷️ Commit: e0af8db8bdab293e62c632355b9cc88ceb1d8cb4
▶️ Tests: 0 executed
🟡 Checks: 20/26 completed
### Rerun Controls
Click the checkbox to trigger a rerun:
🔲 **Rerun jobs**
---
_Learn more about TestLens at
[testlens.app/docs](https://testlens.app/docs/features/pr-comment/)._
> STC rejects a @Virtual trait static accessor read or written with property
> syntax
> ---------------------------------------------------------------------------------
>
> Key: GROOVY-12594
> URL: https://issues.apache.org/jira/browse/GROOVY-12594
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> import groovy.transform.Virtual
> @groovy.transform.CompileStatic
> trait T {
> @Virtual static boolean isVr() { false }
> static String sm() { vr ? 'yes' : 'no' }
> }
> class C implements T { static boolean isVr() { true } }
> class D implements T { }
> assert [C.sm(), D.sm()] == ['yes', 'no']
> {code}
> Actual: {{[Static type checking] - No such property: vr for Class or static
> property for class: T}} with {{@CompileStatic}} or {{@TypeChecked}}. The same
> error occurs in instance trait methods, for a @Virtual setter written as an
> assignment or compound assignment, and for a @Virtual accessor of a super
> trait. The method form {{isVr()}} compiles, and dynamic Groovy runs the
> script.
> Expected: the script compiles, and the property reads and writes dispatch
> through the implementing class like {{isVr()}} does, giving {{yes}} for {{C}}
> and {{no}} for {{D}}.
> A @Virtual static is not promoted to the trait interface, so the type checker
> finds no property on the trait for the receiver that the trait transformation
> produces. The method form is resolved through the trait type checking
> extension; the property form is not.
> Seen in 6.0.0 (the first version with @Virtual).
> PR: https://github.com/apache/groovy/pull/3121
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)