Author Login
Post Reply
Hi people,
I am new to Gant and I'm trying to rewrite my build system (good choice) .
Is it possible to have named parameters in a closure ? The reason I am
asking is that I need to replicate my ant macrodefs and keep working the
same way with defaults. As long as a Gant target is a closure I need to know
whether is possible to have named parameters in a closure or if there's a
slight diference between them then I would like to know which is that.
Here's my code that I am trying and I am royally failing :
target (test : 'test'){
a='a',b='b' ->
println(a);
println(b);
}
target (test1 : 'test1'){
test( b : 'c' );
}
setDefaultTarget ( test1 );
I would expect this to print :
a
c
instead, it prints :
["b":"c"]
b
Am I doing something wrong or is this how is supposed to work ?
can you help ?
Thanks very much
Razvan
--
Sent from the groovy - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email