You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Marcel Wagner (Jira)" <ji...@apache.org> on 2021/02/21 18:52:00 UTC
[jira] [Created] (GROOVY-9950) Strange ClassCastException when
calling ToString in CompileStatic
Marcel Wagner created GROOVY-9950:
-------------------------------------
Summary: 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
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.3.4#803005)