sci
sci copied to clipboard
Unexpected error when implementing methods on Object
bb -e "(deftype RingBuffer [head tail] Object (pop [_]))"
----- Error --------------------------------------------------------------------
Type: clojure.lang.ExceptionInfo
Message: Could not resolve symbol: sci.impl.records/pop
Phase: analysis
Same with nbb
.
Error in Clojure JVM:
Can't define method not in interfaces: pop
Apparently in CLJS it's valid to implement any method on Object:
plk -e "(deftype RingBuffer [head tail] Object (pop [_])) (.pop (->RingBuffer 1 []))"