You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2022/07/23 16:32:00 UTC

[jira] [Updated] (GROOVY-10660) STC: infer closure/lambda parameter types for return expression

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

Eric Milles updated GROOVY-10660:
---------------------------------
    Fix Version/s:     (was: 5.0.0-alpha-1)

> STC: infer closure/lambda parameter types for return expression
> ---------------------------------------------------------------
>
>                 Key: GROOVY-10660
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10660
>             Project: Groovy
>          Issue Type: Improvement
>          Components: Static Type Checker
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 4.0.4
>
>
> Consider the following:
> {code:groovy}
> import java.util.function.BiConsumer
> @groovy.transform.TypeChecked
> def BiConsumer<String, List<?>> m() {
>   return (text, list) -> {
>     // ...
>   }
> }
> {code}
> The types of "text" and "list" are not known and errors occur for String or List method calls.
> https://github.com/groovy/groovy-eclipse/issues/1327
> https://github.com/groovy/groovy-eclipse/issues/1373



--
This message was sent by Atlassian Jira
(v8.20.10#820010)