groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Johnson <john...@cs.uiuc.edu>
Subject Re: deprecated varargs syntax?
Date Thu, 23 Jul 2015 16:45:50 GMT
The problem with the scripts was that the system was using the wrong
superclass for the scripts.  So, the problem didn't have anything to do
with the varargs form, that was just what attracted my attention because I
was not that familiar with it.

On Thu, Jul 23, 2015 at 10:23 AM, Keegan Witt <keeganwitt@gmail.com> wrote:

> Could you give more information on the types of the parameters to the
> method?  I just used a String for t and d and it worked in groovyConsole
> for both 2.1.6 and 2.1.8.  Have you been able to reproduce this in a simple
> example?  Also, what are you using to compile Groovy?
>
> -Keegan
>
> On Tue, Jul 7, 2015 at 3:47 PM, Ralph Johnson <johnson@cs.uiuc.edu> wrote:
>
>> I recently changed the compiler from 2.1.6 to 2.1.8 and a couple of
>> things changed.  I just found this problem and wonder if it is one more.
>>
>> We have scripts with lines of the form
>>
>> openModalWindow 'EditScreen', fromType: t, withData: d
>>
>> which calls the following method where options is the map {fromType: t,
>> withData: d}.
>>
>> def openModalWindow(Map options=[:], Object screenName) {
>>
>>     ...
>>
>> }
>>
>> The scripts just stopped working, and the error is that there is no
>> method to match openModelWIndow(String).
>>
>> The documentation only describes the varargs form where the last
>> parameter is a variable-length array, not the one where the first one is a
>> map.
>>
>> Did this syntax get deprecated?
>>
>
>

Mime
View raw message