We're updating the issue view to help you get more done. 

ChunkCons -next doesn't handle nil more

Description

Repro:

Evaluate the following in Clojure:

1 2 3 (let [b (chunk-buffer 1)] (chunk-append b 0) (next (chunk-cons (chunk b) nil)))

and you will get back nil.

In ClojureScript, this will produce an error "No protocol method ISeqable.-seq defined for type null".

The 2nd argument to chunk-cons can be nil, viz: https://github.com/clojure/clojurescript/blob/b1ade48e21f9e7f78d9db74559ce4dd5846d0c94/src/main/clojure/cljs/core.cljc#L2420

Environment

{:deps {org.clojure/clojurescript {:mvn/version "1.10.339"}}

Status

Assignee

Mike Fikes

Reporter

Mike Fikes

Labels

None

Approval

Accepted

Patch

Code and Test

Affects versions

1.10.238

Priority

Major