Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Duplicate
-
Affects Version/s: 1.7.6
-
Fix Version/s: None
-
Component/s: Groovy Console
-
Labels:None
-
Environment:Windows XP Pro Version 2002 Service Pack 3
-
Number of attachments :
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
This issue seems to duplicate
GROOVY-3589The logic for this should have been changed in 1.6 already then. If it worked in a 1.6 or 1.7 version, then it was a bug I would assume