[
https://issues.apache.org/jira/browse/GROOVY-9706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King resolved GROOVY-9706.
-------------------------------
Fix Version/s: 3.0.6
4.0.0-alpha-1
Assignee: Paul King
Resolution: Fixed
Should be fixed. Thanks for spotting the issue.
> 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, 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)