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 2020/09/14 17:07:00 UTC
[jira] [Assigned] (GROOVY-8961) Cannot pass generic list into
explicit setter
[ https://issues.apache.org/jira/browse/GROOVY-8961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles reassigned GROOVY-8961:
-----------------------------------
Assignee: Eric Milles
> 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
> Assignee: Eric Milles
> Priority: Major
>
> {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
(v8.3.4#803005)