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

Incorrect type inference for closure parameter chained after collectMany

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.4
    • 2.3.5
    • Static Type Checker
    • None

    Description

      I'm experiencing a problem when I chain another iterator method closure after collectMany. The parameter type of the closure on the following method should be the element type of the list returned by collectMany and when using dynamic Groovy this works fine. The static type checker thinks the closure parameter should be List and is failing to compile.

      See attached example.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            robfletcher Rob Fletcher
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: