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 2020/09/10 01:40:00 UTC

[jira] [Updated] (GROOVY-9706) Groovy 3.0.5 varargs [Static type checking] - Cannot find matching method

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

Paul King updated GROOVY-9706:
------------------------------
    Fix Version/s: 2.5.14

> Groovy 3.0.5 varargs [Static type checking] - Cannot find matching method
> -------------------------------------------------------------------------
>
>                 Key: GROOVY-9706
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9706
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 3.0.5
>         Environment: Java version AdoptOpenJDK (build 25.262-b10, mixed mode)
> Gradle version 6.6.1
> Groovy version 3.0.5 
>            Reporter: Chiang Seng Chang
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 4.0.0-alpha-1, 2.5.14, 3.0.6
>
>         Attachments: g3varargs.tar.gz
>
>
> Compile error: [Static type checking] - Cannot find matching method foo.Foo#vfunc(java.lang.String, java.lang.Integer).
> If i is declared as int, then it compiles okay.
>  
> {noformat}
> package foo
> import groovy.transform.CompileStatic
> @CompileStatic
> class Foo {
>     private void vfunc(String s, int... ints) {}
>     void caller() {
>         Integer i = 1
>         vfunc('foo', i)
>     }
> }
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)