[ https://issues.apache.org/jira/browse/GROOVY-8241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16288663#comment-16288663 ]
ASF GitHub Bot commented on GROOVY-8241: ---------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/643 > SAM parameter type inference for explicit parameter > --------------------------------------------------- > > Key: GROOVY-8241 > URL: https://issues.apache.org/jira/browse/GROOVY-8241 > Project: Groovy > Issue Type: Bug > Components: Static compilation, Static Type Checker > Affects Versions: 2.4.10 > Reporter: Daniil Ovchinnikov > > {code} > import groovy.transform.CompileStatic > import java.util.function.Predicate > @CompileStatic > static boolean foo(Predicate<? super String> p) { > p.test("foo") > } > @CompileStatic > static def testPredicate() { > foo { // it -> > it.toUpperCase() > true > } > } > {code} > Uncomment {{it}}, compiler will say: > {noformat} > Cannot find matching method java.lang.Object#toUpperCase() > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)