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/06/19 13:17:00 UTC
[jira] [Created] (GROOVY-10660) STC: infer closure/lambda parameter types for return expression
Eric Milles created GROOVY-10660:
------------------------------------
Summary: 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
Consider the following:
{code:groovy}
@groovy.transform.TypeChecked
def <T> BiConsumer<String, List<T>> m() {
return (text, list) -> {
// ...
}
}
{code}
The types of "text" and "list" are not known and errors occur for String or List method calls.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)