[ https://issues.apache.org/jira/browse/GROOVY-5185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14597192#comment-14597192 ]
ASF GitHub Bot commented on GROOVY-5185: ---------------------------------------- GitHub user paulk-asert opened a pull request: https://github.com/apache/incubator-groovy/pull/42 GROOVY-5185: Cast operator precedence is incorrect I think this rolls back the prod code changes from GROOVY-2605 but we may have done other changes in the meantime since the tests for the issue seem to all still pass. You can merge this pull request into a Git repository by running: $ git pull https://github.com/paulk-asert/incubator-groovy groovy5185 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-groovy/pull/42.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #42 ---- commit 3b9f239790482931a9651cb18c4f0aeeb40ef116 Author: Paul King <pa...@asert.com.au> Date: 2015-06-23T05:26:02Z GROOVY-5185: Cast operator precedence is incorrect ---- > Cast operator precedence is incorrect > ------------------------------------- > > Key: GROOVY-5185 > URL: https://issues.apache.org/jira/browse/GROOVY-5185 > Project: Groovy > Issue Type: Sub-task > Components: groovy-runtime > Affects Versions: 1.8.4 > Reporter: Cédric Champeau > > The cast operator precedence is incorrect: > {code} > def i = (int)1/(int)2 > assert i.class==BigDecimal // fails > {code} > To have proper casts, we need extra parenthesis which should not be necessary: > {code} > def i = ((int)1)/((int)2) > assert i.class==BigDecimal // ok > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)