[
https://issues.apache.org/jira/browse/GROOVY-11438?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles resolved GROOVY-11438.
----------------------------------
Fix Version/s: 5.0.0-alpha-10
Resolution: Fixed
https://github.com/apache/groovy/commit/65ce840a7cde7460637e52b716d20741cf1d2f77
> STC: loss of precision check for typecast number literals
> ---------------------------------------------------------
>
> Key: GROOVY-11438
> URL: https://issues.apache.org/jira/browse/GROOVY-11438
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Minor
> Fix For: 5.0.0-alpha-10
>
>
> Consider the following:
> {code:groovy}
> @TypeChecked test() {
> byte b = (short) 123
> }
> {code}
> This code warns of "Possible loss of precision". However, the number is okay
> and there is no way to write a {{byte}} or {{short}} literal without a
> typecast.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)