You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2022/02/03 22:35:01 UTC

[jira] [Closed] (GROOVY-10088) STC: type argument not applied to error message

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

Paul King closed GROOVY-10088.
------------------------------

> STC: type argument not applied to error message
> -----------------------------------------------
>
>                 Key: GROOVY-10088
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10088
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 4.0.0-beta-1
>
>
> Consider the following:
> {code:groovy}
> class C<T> {
>   void setP(T t) { }
> }
> class D<X> extends C<X> {
> }
> @groovy.transform.TypeChecked
> void test() {
>   new D<Number>().p = 'x' // Cannot assign value of type java.lang.String to variable of type T
> }
> {code}
> Error message references "T" and not "java.lang.Number".



--
This message was sent by Atlassian Jira
(v8.20.1#820001)