I have a misbehaving piece of code; when I name a record MethodInfo, it no longer overrides the .toString method correctly.
(defrecord MethodInfo [^clojure.lang.ISeq x ^clojure.lang.ISeq y]
java.lang.Object
(toString [x]
(str (:x x))))
Running a simple test shows how this fails,
=> (.toString (new MethodInfo [1 2] [3]))
"sketch.compiler.main.sklojure1.MethodInfo@10e0d118"
whereas renaming the record to A shows the code behaving correctly,
=> (.toString (new A [1 2] [3]))
"[1 2]"
what am I doing wrong??