You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniil Ovchinnikov (JIRA)" <ji...@apache.org> on 2019/01/18 12:40:00 UTC
[jira] [Created] (GROOVY-8961) Cannot pass generic list into
explicit setter
Daniil Ovchinnikov created GROOVY-8961:
------------------------------------------
Summary: Cannot pass generic list into explicit setter
Key: GROOVY-8961
URL: https://issues.apache.org/jira/browse/GROOVY-8961
Project: Groovy
Issue Type: Bug
Components: Static Type Checker
Affects Versions: 2.5.5
Reporter: Daniil Ovchinnikov
{code}
class GC {
void setStrings(List<String> ss) {}
}
@groovy.transform.CompileStatic
void usage(GC gc) {
gc.strings = Collections.emptyList()
}
{code}
{noformat}
[Static type checking] - Cannot assign value of type java.util.List <T extends java.lang.Object> to variable of type java.util.List <String>
at line: 7, column: 5
{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)