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/03/28 16:25:00 UTC

[jira] [Updated] (GROOVY-7128) Generic method declaration should see the super class

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

Eric Milles updated GROOVY-7128:
--------------------------------
    Fix Version/s: 4.0.0-alpha-3

> Generic method declaration should see the super class
> -----------------------------------------------------
>
>                 Key: GROOVY-7128
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7128
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>    Affects Versions: 2.3.7, 2.4.0-beta-3
>            Reporter: Yu Kobayashi
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 4.0.0-alpha-3
>
>
> {code}
> @groovy.transform.CompileStatic
> void test() {
>     List<Number> list = [1]
> }
> {code}
> {code}
> C:\Users\Yu\Desktop\test.groovy: 3: [Static type checking] - Incompatible generic argument types. Cannot assign java.util.List <java.lang.Integer> to: java.util.List <Number>
>  @ line 3, column 25.
>        List<Number> list = [1]
>                            ^
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)