Maybe it's your compiler that broke, and not Groovy. How are you compiling this?
-Keegan On Tue, Jul 7, 2015 at 3:49 PM, Dinko Srkoč <dinko.sr...@gmail.com> wrote: > I can't prove it, but I don't think anything changed between 2.1.6 and > 2.1.8 regarding handling (named) parameters. Even more, I don't think > anything changed there for a long time. > > I tried your example with 1.8.6, 2.1.6, 2.1.8, and 2.4.1 and all those > versions behave the same. > > Example that I tried: > > def openModalWindow(Map options=[:], Object screenName) { > println "screenName=$screenName, options=$options" > } > > def t1 = 'foo' > def stuff = 42 > > openModalWindow 'EditScreen', fromType: t1, withData: stuff > // prints: screenName=EditScreen, options=[fromType:foo, withData:42] > > Cheers, > Dinko > > On 7 July 2015 at 21:24, Ralph Johnson <john...@cs.uiuc.edu> wrote: > > I switched compilers from 2.1.6 to 2.1.8 and something broke. I am > thinking > > that perhaps an old language feature went away. > > > > We have scripts that say something like > > > > openModalWindow 'EditScreen', fromType: t1, withData: stuff > > > > and it gets translated into a call on > > > > def openModalWindow(Map options=[:], Object screenName) { > > > > ... > > > > } > > > > where options will be the map {fromType: t1, withData: stuff} except > that it > > has the values of the variables t1 and stuff. Did this go away? If so, > > what should I replace it with? I can't actually find documentation for > it, > > which leads me to believe it was deprecated. I >