I load the following script into groovysh:
def a() {
println "a()"
}
def b() {
println "b()"
a()
}
by using :load 'test.groovy'
and call method b():
b()
I get:
groovy:000> b()
b()
No signature of method: groovysh_evaluate.a() is applicable for argument types: () values: []
Possible solutions: b(), any(), is(java.lang.Object), any(groovy.lang.Closure), wait(), run()
at groovysh_evaluate.b (groovysh_evaluate:5)
Why cannot groovysh find method a()?