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 2026/10/20 01:27:01 UTC

[jira] [Closed] (GROOVY-11664) STC: method call with class literals

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

Paul King closed GROOVY-11664.
------------------------------

> STC: method call with class literals
> ------------------------------------
>
>                 Key: GROOVY-11664
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11664
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Minor
>             Fix For: 5.0.0-beta-2
>
>
> Consider the following:
> {code:groovy}
> class A {}
> class B extends A {}
> class C extends B {}
> @groovy.transform.TypeChecked test() {
>     def list = Arrays.asList(A.class, B.class, C.class)
> }
> test()
> {code}
> This fails with "Cannot call <T> java.util.Arrays#asList(T[]) with arguments [java.lang.Class<A>, java.lang.Class<B>, java.lang.Class<C>]"



--
This message was sent by Atlassian Jira
(v8.20.10#820010)