groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (GROOVY-8964) MissingMethodException when trying to resolve overload with variable arguments
Date Thu, 31 Jan 2019 11:23:00 GMT

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

Paul King resolved GROOVY-8964.
-------------------------------
       Resolution: Fixed
         Assignee: Paul King
    Fix Version/s: 3.0.0-alpha-5
                   2.5.6

Proposed PR merged. Thanks for reporting the issue.

> MissingMethodException when trying to resolve overload with variable arguments
> ------------------------------------------------------------------------------
>
>                 Key: GROOVY-8964
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8964
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.5.5
>         Environment: Windows
>            Reporter: Alexey Subach
>            Assignee: Paul King
>            Priority: Critical
>             Fix For: 2.5.6, 3.0.0-alpha-5
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Minimal script to reproduce the issue:
> {code}
> #!/usr/bin/env groovy
> class Example {
>     void method(String... args) {
>     }
>     static void method(List<String> args, File workDirectory, Appendable out, Appendable
err) {
>     }
>     void execute() {
>         method("a", "b", "c", "d")
>     }
> }
> Example ex = new Example()
> ex.execute()
> {code}
> Running this script on Windows produces the following exception:
> {code}
> Caught: groovy.lang.MissingMethodException: No signature of method: static Example.method()
is applicable for argument types: (String, String, String, String) values: [a, b, c, d]
> Possible solutions: method([Ljava.lang.String;), method(java.util.List, java.io.File,
java.lang.Appendable, java.lang.Appendable)
> groovy.lang.MissingMethodException: No signature of method: static Example.method() is
applicable for argument types: (String, String, String, String) values: [a, b, c, d]
> Possible solutions: method([Ljava.lang.String;), method(java.util.List, java.io.File,
java.lang.Appendable, java.lang.Appendable)
>         at Example.execute(Hello.groovy:12)
>         at Example$execute.call(Unknown Source)
>         at Hello.run(Hello.groovy:17)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message