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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.13
    • Fix Version/s: 2.4.13
    • Component/s: Static compilation
    • Labels:
      None
    • Environment:
      any
    • Flags:
      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: