You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2023/04/11 14:21:00 UTC

[jira] [Assigned] (GROOVY-11003) Cannot find method with variable arguments when using fully qualified class names

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

Eric Milles reassigned GROOVY-11003:
------------------------------------

    Assignee: Eric Milles

> Cannot find method with variable arguments when using fully qualified class names
> ---------------------------------------------------------------------------------
>
>                 Key: GROOVY-11003
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11003
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>            Reporter: Thodoris Sotiropoulos
>            Assignee: Eric Milles
>            Priority: Major
>
> I have the following program
> {code}
> class Main {
>   static final void test(java.util.List<Integer> p) {
>     m(1, p);
>   }
>   static <T> void m(Integer x, java.util.List<T>... items) { }
> }
> {code}
> h3. Actual behavior
> {code}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> test.groovy: 3: [Static type checking] - Cannot find matching method Main#m(int, java.util.List<java.lang.Integer>). Please check if the declared type is correct and if the method exists.
>  @ line 3, column 5.
>        m(1, p);
>        ^
> 1 error
> {code}
> h3. Expected behavior
> Compile successfully
> Tested against master (commit: a4e0d6de9cc2d8ecb48b48df501e63ec1735d837)



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