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 2021/10/12 15:24:00 UTC

[jira] [Comment Edited] (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:comment-tabpanel&focusedCommentId=17427762#comment-17427762 ] 

Eric Milles edited comment on GROOVY-7720 at 10/12/21, 3:23 PM:
----------------------------------------------------------------

GROOVY-10222 regression takes priority

See also GROOVY-9952 and GROOVY-10127


was (Author: emilles):
GROOVY-10222 regression takes priority

> 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
>             Fix For: 4.0.0-beta-1
>
>
> 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.3.4#803005)