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

Regression in 2.4.13-SNAPSHOT: x & y, x | y, x ^ y lose typing information

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.13
    • 2.4.13
    • Static compilation
    • None
    • any
    • Important

    Description

      This used to work up to 2.4.12:

      @groovy.transform.CompileStatic
      class bla {
         static void main(String[] args) {
            println new Long( 5 / 3 )
         }
      }
      

      starting with 2.4.13, it gives this error message:

      bla.groovy: 4: [Static type checking] - Cannot find matching method java.lang.Long#<init>(java.math.BigDecimal). Please check if the declared type is right and if the method exists.
       @ line 4, column 15.
               println new Long( 5 / 3 )
      

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              patric42 Patric Bechtel
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: