Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending a protocol to nil results in an error #586

Closed
thomascothran opened this issue Nov 28, 2024 · 0 comments
Closed

Extending a protocol to nil results in an error #586

thomascothran opened this issue Nov 28, 2024 · 0 comments

Comments

@thomascothran
Copy link

version

v0.8.125

problem

Extending a protocol to nil results in an error.

repro

(defprotocol Identity (i [this]))
(extend-protocol Identity object (i [s] s))  ;; <- this works
(extend-protocol Identity nil (i [_])) ;; <- this results in an error

The error looks like this:

expected expression, got keyword 'const'

evalCode@https://squint-cljs.github.io/squint/assets/index-C43Gqe_m.js:246:196
window.compile@https://squint-cljs.github.io/squint/assets/index-C43Gqe_m.js:302:5
onclick@https://squint-cljs.github.io/squint/:1:1

Squint playground reproduction

expected behavior

Parity with clojure and clojurescript when extending a protocol to nil.

borkdude added a commit that referenced this issue Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant