groovy/groovy-core — pull request #84 by adriannistor (2012-12-17 23:41:18+00:00)
Title: wasted work in "StaticTypeCheckingVisitor.inferReturnTypeGenerics"

The problem appears in version 2.0.5 and in revision 4cf5263.. I
submitted the GROOVY-5850 bug report in Groovy JIRA.

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.