Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.10
-
None
-
Windows 7, JDK 1.8.0_66
Description
Declare enum:
public enum Functions { A, B, C }
Create test class, add the following test and try to compile:
@Test @CompileStatic void testEachForEnum() { Functions.values().each { println it.name() } }
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
Attachments
Issue Links
- links to