Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-JSR-3
-
Fix Version/s: 1.0-JSR-4
-
Component/s: None
-
Labels:None
-
Environment:jdk 142_09. groovy jsr3, winxp sp 2
-
Number of attachments :
Description
try this:
C:\>groovy -e "println(int.class)"
int
C:\>groovy -e "println(void.class)"
script_from_command_line: 1: Unknown type: "void" at line: 1 column: 9. File: script_from_command_line @ line 1, column 9.
1 Error
void.class is a valid class in Java, and should be that in groovy, too.
I know Void class is accessible, but this is not adequate, as void.class and Void.class are different (return false for equals method), just like int.class and Integer.class are different.
WORKAROUND:
With Void.class you can of course use:
[rosco@jukebox jen] groovy -e 'println Void.TYPE'
void
but I too would like to see 'void.class' recognised if possible...