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

wasted work in "StaticTypeCheckingVisitor.inferReturnTypeGenerics"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.5
    • 2.1.0
    • Static Type Checker
    • None
    • Patch

    Description

      The problem appears in version 2.0.5 and in revision 4cf5263.. I
      attached a one-line patch that fixes it. I will also post (in the
      "Comments" section) the URL for the github pull request.

      There is no Groovy test that touches this code location (the entire
      "else" branch that contains this code is not touched), but I think the
      patch is correct.

      In method "StaticTypeCheckingVisitor.inferReturnTypeGenerics", the
      loop over "interfaces" should break immediately after "actualType" is
      set. All the iterations after "actualType" is set do not perform any
      useful work.

      Attachments

        1. patch.diff
          0.9 kB

        Activity

          People

            pschumacher Pascal Schumacher
            adriannistor Adrian Nistor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: