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

Type checker select the wrong inject method

    XMLWordPrintableJSON

Details

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

    Description

      In the following example:

      ['a','bb','ccc'].inject(0) { int acc, String str -> acc += str.length(); acc }
      

      The type checker thinks the method to be called is DGM#inject(Object,Object,Closure) instead of DGM#inject(Collection,Object,Closure)

      Attachments

        Issue Links

          Activity

            People

              melix Cédric Champeau
              melix Cédric Champeau
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: