[ https://issues.apache.org/jira/browse/GROOVY-8205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-8205. ----------------------------- > Static type checking failure for enums > -------------------------------------- > > Key: GROOVY-8205 > URL: https://issues.apache.org/jira/browse/GROOVY-8205 > Project: Groovy > Issue Type: Bug > Components: Static Type Checker > Affects Versions: 2.4.10 > Environment: Windows 7, JDK 1.8.0_66 > Reporter: Iurii > Assignee: John Wagenleitner > Priority: Major > Fix For: 2.5.0-beta-2 > > > Declare enum: > {code} > public enum Functions { > A, B, C > } > {code} > Create test class, add the following test and try to compile: > {code} > @Test > @CompileStatic > void testEachForEnum() { > Functions.values().each { println it.name() } > } > {code} > Result: Groovyc: [Static type checking] - Cannot find matching method > java.lang.Object#name(). Please check if the declared type is right and if > the method exists. > Expected: code should compile without errors -- This message was sent by Atlassian JIRA (v7.6.3#76005)