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

Groovy STC fails on the nested method call in constructor call

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.0-rc-3, 2.5.0
    • 2.6.0-alpha-4, 3.0.0-alpha-3, 2.5.1
    • Static Type Checker
    • None
    • I can reproduce from the command line with:

      groovy mapComparisonTest.groovy

      With Groovy 2.5.0 and Java 1.8.0_172 on macOS High Sierra.


    Description

      The error returns on line 22 of the attached file:

      return new IntegerPairIterator(unionKeys.iterator())

      Assigning to a temporary variable and returning on a second line OR removing @StaticCompile will fix the problem.

      I thought this was related to GROOVY-8590 because it first occurred in Groovy 2.5.0-rc-3, but it was not fixed in Groovy 2.5.0.

      Attachments

        1. mapComparisonTest.groovy
          1 kB
          Sean Gilligan

        Issue Links

          Activity

            People

              daniel_sun Daniel Sun
              msgilligan Sean Gilligan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: