[ https://issues.apache.org/jira/browse/GROOVY-7598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14945331#comment-14945331 ]
ASF GitHub Bot commented on GROOVY-7598: ---------------------------------------- GitHub user shils opened a pull request: https://github.com/apache/incubator-groovy/pull/133 GROOVY-7598 Generic types are not checked for return statements (STC) Though this is something I had assumed was already in place, it could be a breaking change given that I had to slightly modify a unit test. You can merge this pull request into a Git repository by running: $ git pull https://github.com/shils/incubator-groovy GROOVY-7598 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-groovy/pull/133.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #133 ---- commit 64f7c59b8b2b45cd855831502b858850638049ea Author: Shil S <shil.si...@gmail.com> Date: 2015-10-06T16:31:32Z GROOVY-7598 Generic types are not checked for return statements (STC) ---- > type checking with generics > --------------------------- > > Key: GROOVY-7598 > URL: https://issues.apache.org/jira/browse/GROOVY-7598 > Project: Groovy > Issue Type: Bug > Components: Static Type Checker > Affects Versions: 2.4.4 > Reporter: JAMIE ECHLIN > Assignee: Cédric Champeau > > The following compiles without error... I don't think it should: > {code} > import groovy.transform.TypeChecked > @TypeChecked > class C extends Script { > @Override > List<String> run() { > [11, 12] > } > } > {code} > What I would expect to see is: > Cannot return ArrayList<Integer> from method returning List<String> -- This message was sent by Atlassian JIRA (v6.3.4#6332)