Dear all,
I'm cross-posting this issue because it's hard to understand if it'd Groovy or Gpars problem.
When running the following piece of code, I'm getting exception below
import groovyx.gpars.agent.Agent
import groovy.transform.CompileStatic
@CompileStatic
class Dummy {
def void foo() {
def x = new Agent<List>( [] )
x.send { List it -> it.add(1) }
x.await()
}
}
new Dummy().foo()
java.lang.IllegalAccessError: tried to access class groovyx.gpars.agent.AgentBase from class Dummy
at Dummy.foo(ConsoleScript15:10)
at Dummy$foo.call(Unknown Source)
at ConsoleScript15.run(ConsoleScript15:16)
The guilty line is "x.await()". If I remove the @CompileStatic it works fine.
Any clue?
Cheers,
Paolo