You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2022/02/03 22:46:00 UTC

[jira] [Updated] (GROOVY-7720) Type incompatibility of generic placeholders not detected on assignment

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

Paul King updated GROOVY-7720:
------------------------------
    Fix Version/s:     (was: 4.0.0-beta-1)

> Type incompatibility of generic placeholders not detected on assignment
> -----------------------------------------------------------------------
>
>                 Key: GROOVY-7720
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7720
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>    Affects Versions: 2.4.0, 2.4.5
>            Reporter: Frank Pavageau
>            Assignee: Eric Milles
>            Priority: Major
>
> It looks like the issue in GROOVY-7719 can be generalized, because the following compiles:
> {code}
> class Foo<T> {
>     public <U> void set(U value) {
>         T localValue = value
>     }
> }
> def foo = new Foo<Integer>()
> foo.set(new Object())
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)