You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2023/11/03 16:51:00 UTC
[jira] [Updated] (GROOVY-8488) STC: floating-point literals no longer accepted as args to method with double parameter
[ https://issues.apache.org/jira/browse/GROOVY-8488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-8488:
--------------------------------
Fix Version/s: 4.0.16
> STC: floating-point literals no longer accepted as args to method with double parameter
> ---------------------------------------------------------------------------------------
>
> Key: GROOVY-8488
> URL: https://issues.apache.org/jira/browse/GROOVY-8488
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Affects Versions: 2.4.13
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Fix For: 5.0.0-alpha-3, 4.0.16
>
>
> I'm not sure if this recent change was intentional or not. If it is intended, so be it. But in case this has not been seen by anyone else, we had a lot of code that did floating-point computations and used @CompileStatic. Starting with Groovy 2.4.13 (I think), we are seeing STC errors.
> {code:groovy}
> import groovy.transform.CompileStatic
> @CompileStatic
> class Static {
> def main() {
> meth(1.0) // STC error
> }
> def meth(double val) {
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)