[
https://issues.apache.org/jira/browse/GROOVY-10257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Sun reassigned GROOVY-10257:
-----------------------------------
Assignee: Daniel Sun (was: Eric Milles)
> STC: no error for incompatible method argument
> ----------------------------------------------
>
> Key: GROOVY-10257
> URL: https://issues.apache.org/jira/browse/GROOVY-10257
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Affects Versions: 4.0.0-beta-1
> Reporter: Eric Milles
> Assignee: Daniel Sun
> Priority: Minor
>
> Consider the following:
> {code:groovy}
> class C<T> {
> void accept(T t) {
> }
> def <X extends Number> X produce() {
> }
> @groovy.transform.TypeChecked
> void test() {
> accept(produce()) // not compatible
> }
> }
> {code}
> Java compiler says "Cannot convert from Number to T". Groovy compiler
> produces no error.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)