Closed GoogleCodeExporter closed 9 years ago
That is Grape-depended problem. I tested the following examples with
0.4.2-groovy-2.1 and they are successfully compiled and run with the local jar
file but not via Grape.
{{{
benchmark(verbose:true) {
'Each' {
def i = 0
(1..100000000).each { i ++ }
}
'For' {
def i = 0
for (x in 1..100000000) { i ++ }
}
}.prettyPrint()
}}}
{{{
{ -> // this arrow is required
'Each' {
def i = 0
(1..100000000).each { i ++ }
}
'For' {
def i = 0
for (x in 1..100000000) { i ++ }
}
}.benchmark().prettyPrint()
}}}
Original comment by nagaimas...@gmail.com
on 26 Mar 2013 at 3:25
I'll test a bit more and report the problem to Groovy project.
Original comment by nagaimas...@gmail.com
on 26 Mar 2013 at 4:03
http://jira.codehaus.org/browse/GROOVY-6069
Original comment by nagaimas...@gmail.com
on 27 Mar 2013 at 8:37
I got an answer from groovy team. It's not a bug.
[https://jira.codehaus.org/browse/GROOVY-6069?focusedCommentId=322751&page=com.a
tlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-322751]
{quote}
I don't think this is specific to extension module. The problem is that @Grab
is an annotation, so you can only put @Grab where annotations are valid. This
means imports or packages definitions here. For example:
{quote}
Original comment by nagaimas...@gmail.com
on 28 Mar 2013 at 2:17
Original issue reported on code.google.com by
googlegr...@transentia.com.au
on 24 Mar 2013 at 11:46