Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.8
-
None
Description
When compiling this interface:
@CompileStatic interface Service { TypeReference<Map<String, Object>> STATE_TYPE_MAP = new TypeReference<Map<String, Object>>(){} }
the stub generator produces code that does not compile under Java 11:
@groovy.transform.CompileStatic() public interface Service <T> { ; com.fasterxml.jackson.core.type.TypeReference<java.util.Map<java.lang.String, java.lang.Object>> STATE_TYPE_MAP; static { STATE_TYPE_MAP = null; }
[ERROR] Service.java:[6,112] = expected [ERROR] Service.java:[7,8] initializers not allowed in interfaces
Attachments
Issue Links
- is related to
-
GROOVY-10902 Dynamic constants for primitive types get default value in Java
- Closed
-
GROOVY-5150 Switch to a primitive representation of constants
- Closed