Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

The following currently works on master:

$ cljs -R:cljs/dev -re node cljs.user=> (defprotocol IFoo (delete [_])) false cljs.user=> (extend-type default IFoo (delete [_] 17)) nil cljs.user=> (delete #js {}) 17

But, it didn't with 1.10.439:

`
$ cljs -R:cljs/rel -re node
ClojureScript 1.10.439
cljs.user=> (defprotocol IFoo (delete [_]))
false
cljs.user=> (extend-type default IFoo (delete [_] 17))
nil
cljs.user=> (delete #js {})
repl:13
throw e6600auto__;
^

TypeError: Cannot read property 'object' of undefined

at cljs$user$delete (repl:18:40)
at repl:1:107
at repl:9:3
at repl:14:4
at ContextifyScript.Script.runInThisContext (vm.js:50:33)
at Object.runInThisContext (vm.js:139:38)
at Domain.<anonymous> ([stdin]:76:38)
at Domain.run (domain.js:242:14)
at Socket.<anonymous> ([stdin]:73:29)
at emitOne (events.js:116:13)

`

This was evidently fixed as a side effect of CLJS-2960.

This ticket asks that a test be added to ensure this correct behavior going forward.

2 Answers

0 votes
by

Comment made by: mfikes

CLJS-3039-2.patch passes CI (/)

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-3039 (reported by mfikes)
...