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

Eric Milles updated GROOVY-10257:
---------------------------------
    Priority: Minor  (was: Major)

> 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: Eric Milles
>            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
(v8.20.10#820010)

Reply via email to