You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2025/04/01 21:15:00 UTC
[jira] [Created] (GROOVY-11597) STC: element type of enum class
Eric Milles created GROOVY-11597:
------------------------------------
Summary: STC: element type of enum class
Key: GROOVY-11597
URL: https://issues.apache.org/jira/browse/GROOVY-11597
Project: Groovy
Issue Type: Bug
Components: Static Type Checker
Reporter: Eric Milles
Consider the following:
{code:groovy}
@TypeChecked test() {
for (ts in Thread.State) {
println "${ts.ordinal()}: ${ts.name()}"
}
}
{code}
Without STC, this runs and prints out the enum values of {{Thread.State}}. With STC, it errors on "ts.name()" and "ts.ordinal()".
--
This message was sent by Atlassian Jira
(v8.20.10#820010)