Details
Description
To reproduce, start groovysh, enter:
groovy:000> config = new ConfigSlurper().parse(new File('foo.groovy').toURL()) groovy:000> config.
press tab
should list properties, newline instead
For full stack, run groovysh --debug
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'groovy.util.ConfigObject@6ad21538' with class 'groovy.util.ConfigObject' to class 'java.lang.Class' due to: java.lang.ClassNotFoundException: groovy.util.ConfigObject@6ad21538
at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToClass(DefaultTypeTransformation.java:380)
at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:249)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:599)
at org.codehaus.groovy.tools.shell.completion.ReflectionCompletor.getPublicFieldsAndMethods(ReflectionCompletor.groovy:277)
at org.codehaus.groovy.tools.shell.completion.ReflectionCompletor$getPublicFieldsAndMethods.callStatic(Unknown Source)
at org.codehaus.groovy.tools.shell.completion.ReflectionCompletor.complete(ReflectionCompletor.groovy:74)
at org.codehaus.groovy.tools.shell.completion.ReflectionCompletor$complete.call(Unknown Source)
This line fails:
Class clazz = instance.class
I last touched the failing class ReflectionCompletor, but sadly I currently have no working environment to run all tests.