Description
I tried AstNodeToScriptAdapter#main() but get
$ groovy -e 'groovy.inspect.swingui.AstNodeToScriptAdapter.main(args)' a.groovy 1 Caught: groovy.lang.MissingMethodException: No signature of method: static org.codehaus.groovy.control.CompilePhase.fromPhaseNumber() is applicable for argument types: (java.lang.String) values: [1] Possible solutions: fromPhaseNumber(int), getPhaseNumber() at groovy.inspect.swingui.AstNodeToScriptAdapter.main(AstNodeToScriptAdapter.groovy:56) at script_from_command_line.run(script_from_command_line:1)
follwing is a patch:
$ svn diff AstNodeToScriptAdapter.groovy Index: AstNodeToScriptAdapter.groovy =================================================================== --- AstNodeToScriptAdapter.groovy (revision 22473) +++ AstNodeToScriptAdapter.groovy (working copy) @@ -52,7 +52,7 @@ and [compilephase] is a valid Integer based org.codehaus.groovy.control.CompilePhase""" } else { def file = new File((String) args[0]) - def phase = CompilePhase.fromPhaseNumber(args[1]) + def phase = CompilePhase.fromPhaseNumber(args[1] as int) if (!file.exists()) { println "File ${args[0]} cannot be found." } else if (phase == null) {