Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
1.7.6
-
None
-
None
-
Windows XP Pro Version 2002 Service Pack 3
Description
On Groovy site http://groovy.codehaus.org/JN0025-Starting
We have this example :
We can convert data of one type to another using the 'as' keyword |
assert ('a' as Integer) == 97 |
I've try this with the Groovy Console Version 1.7.6 :
def v = 'A' as Integer |
I have this message error :
java.lang.NumberFormatException: For input string: "A" |
And it doesn't work with Array
def v = ['A', 'B', 'C'] as Integer[] |
In Groovy version 1.7.5 it's work only for Array