[ 
https://issues.apache.org/jira/browse/GROOVY-8241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Sun closed GROOVY-8241.
------------------------------
       Resolution: Fixed
         Assignee: Daniel Sun
    Fix Version/s: 3.0.0-alpha-2
                   2.4.14
                   2.6.0-alpha-3
                   2.5.0-beta-3

Fixed by 
https://github.com/apache/groovy/commit/bd5191d9a8858945a4d83df58e261eb56bec0ab7


> 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
>            Assignee: Daniel Sun
>             Fix For: 2.5.0-beta-3, 2.6.0-alpha-3, 2.4.14, 3.0.0-alpha-2
>
>
> {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)

Reply via email to