[ 
https://issues.apache.org/jira/browse/GROOVY-5077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15831047#comment-15831047
 ] 

Daniel Sun commented on GROOVY-5077:
------------------------------------

the new parser Parrot will parse "(byte)15 as MyClass" as follows:
((byte)15) as MyClass

Can you provide some runnable test case?

> GroovyCastException after upgrade from Groovy 1.7.10 to 1.8.3
> -------------------------------------------------------------
>
>                 Key: GROOVY-5077
>                 URL: https://issues.apache.org/jira/browse/GROOVY-5077
>             Project: Groovy
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 1.8.3
>         Environment: n.a.
>            Reporter: Alexander Veit
>             Fix For: 4.0
>
>
> Have a catetegory with
> {code}
>   public static Object asType(Byte p_byteSelf, Class<?> p_class)
>   {
>     //...
>     return new MyClass(p_byteSelf);
>   }
> {code}
> With Groovy 1.7.10 the script
> {code}
>   def v
>   v = (byte)15 as MyClass  
> {code}
> worked fine.
> With Groovy 1.8.3 a 
> org.codehaus.groovy.runtime.typehandling.GroovyCastException is thrown.
> Has the operator precedence been changed?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to