Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-beta-5
-
Fix Version/s: 1.1-rc-3
-
Component/s: None
-
Labels:None
Description
groovy> def foo
{ println(x) }
groovy>
null
groovy> foo(5)
groovy>
Caught: groovy.lang.MissingMethodException: No such method: foo for class: CommandLine2 with arguments: [5]
groovy.lang.MissingMethodException: No such method: foo for class: CommandLine2 with arguments: [5]
at groovy.lang.MetaClass.invokeStaticMethod(MetaClass.java:285)
at groovy.lang.MetaClass.invokeMethod(MetaClass.java:241)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at groovy.lang.MetaClass.doMethodInvoke(MetaClass.java:758)
at groovy.lang.MetaClass.invokeMethod(MetaClass.java:214)
at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:130)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:95)
at CommandLine2.invokeMethod(CommandLine2.groovy)
at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:117)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:95)
at CommandLine2.run(CommandLine2.groovy)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:236)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:215)
at groovy.ui.InteractiveShell.run(InteractiveShell.java:100)
at groovy.ui.InteractiveShell.main(InteractiveShell.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.codehaus.classworlds.Launcher.launchStandard(Launcher.java:410)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:344)
at org.codehaus.classworlds.Launcher.main(Launcher.java:474)
Issue Links
- is depended upon by
-
GROOVY-756
improve GroovyShell
-
I have tested the above code with command "groovysh" on JSR-02 (CVS HEAD build).
But I could not found such an error.
$ groovysh
Lets get Groovy!
================
Version: 1.0-jsr-02-SNAPSHOT JVM: 1.4.2_07-b05
Type 'exit' to terminate the shell
Type 'help' for command help
Type 'go' to execute the statements
groovy> def foo
{ println(x) }
groovy>
groovy> foo(5)
groovy>
groovy> go
5