Skip to content

Unexpected error when implementing methods on Object #825

@borkdude

Description

@borkdude
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 []))"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions