Here is minimal demo case:
class T extends HashMap {
@Override
String toString() {
return "foo"
}
}
def t = new T()
println t.toString()
println "${t}"
The output is
foo
[:]
So the @Override toString()
never executed for obtaining value within GString
. Should I put breakpoint inside it never stopped there. Am I missing something or is it a bug? Other than HashMap
and Collection
seems to be working fine.