Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.4
-
Fix Version/s: 1.8.5, 2.0-beta-2
-
Component/s: Compiler
-
Labels:
-
Number of attachments :
Description
Currently, constants such as
public static final int type = 32
are not internally represented as primitives.
This leads to oddities such as a constant being unusable in switch statements.
Since recent versions of the compile now know primitives, it would be nice if the internal representation was changed.
Issue Links
- is related to
-
GROOVY-5292
Stub generation doesn't handle 'protected' multi-line String correctly.
-
Activity
Cedric Champeau
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Assignee | Cedric Champeau [ melix ] | |
| Fix Version/s | 2.0-beta-2 [ 18072 ] | |
| Fix Version/s | 1.8.5 [ 18071 ] | |
| Resolution | Fixed [ 1 ] |
Paul King
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
Paul King
made changes -
| Link |
This issue is related to |
for clarification.... the 32 is a primitive int, but the init is done in cinit, while the bytecode supports the value being set directly for primitives. Only if the value is set directly, it is supported in a java switch before java7.