[ https://issues.apache.org/jira/browse/GROOVY-9950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-9950. ----------------------------- > Strange ClassCastException when calling ToString in CompileStatic > ----------------------------------------------------------------- > > Key: GROOVY-9950 > URL: https://issues.apache.org/jira/browse/GROOVY-9950 > Project: Groovy > Issue Type: Bug > Components: groovy-jdk > Affects Versions: 3.0.7 > Reporter: Marcel Wagner > Priority: Major > > I have a class extending a base class implementing a toString() method. > Making the code CompileStatic I get a ClassCassException. Without > CompileStatic all is fine. > String test = myClazz.toString() I get the ClassCastException with myClazz > could not be cast to String. Debugging is also strange, I can't get to the > base class implementation of toString. > Interrestingly, the implizit call of toString() is functioning: > String test = myClazz All is fine. Debugging also, the toString method is > called > > There seems a bug in CompileStatic. Something is scrambled. -- This message was sent by Atlassian Jira (v8.20.10#820010)