Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8488

STC: floating-point literals no longer accepted as args to method with double parameter

    XMLWordPrintableJSON

Details

    Description

      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.

      import groovy.transform.CompileStatic
      
      @CompileStatic
      class Static {
      
        def main() {
          meth(1.0) // STC error
        }
      
        def meth(double val) {
        }
      }
      

      Attachments

        Issue Links

          Activity

            People

              emilles Eric Milles
              emilles Eric Milles
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: