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

Regression in 2.4.13 (snapshot) with STC and intdiv

    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

      Description

      Even with the fix of 8380, the following still fails:

      @groovy.transform.CompileStatic
      class GanzBla {
         static void main(String[] args) {
            def a = 5.intdiv(2)
            assert a.class == java.lang.Integer
            def b = new Long( 5.intdiv(2) )
         }
      }
      

      Without CS, this just works, the type of 5.intdiv(2) is an Integer. With STC, it's a number suddenly. In 2.4.12, this still works flawlessly.

        Attachments

          Issue Links

            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: