[
https://issues.apache.org/jira/browse/GROOVY-6242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18149097#comment-18149097
]
Daniel Sun commented on GROOVY-6242:
------------------------------------
Fixed on master; added a regression test in
10c5d6871dd81c18c1584d1575087518ab24f9b9
(https://github.com/apache/groovy/commit/10c5d6871dd81c18c1584d1575087518ab24f9b9).
> Inferred type of BigInteger++ can be narrowed
> ---------------------------------------------
>
> Key: GROOVY-6242
> URL: https://issues.apache.org/jira/browse/GROOVY-6242
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Reporter: Cédric Champeau
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 7.0.0-alpha-1
>
>
> If a variable {{bi}} is of type {{BigInteger}} and that one calls {{bi++}},
> then the inferred type is {{Number}} (because the target method returns a
> {{Number}}).
> However, it can be improved because we know that incrementing a
> {{BigInteger}} will always return a {{BigInteger}}
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)