Skip to content

Commit

Permalink
revert accidental patch commit in doc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
puredanger committed Jan 21, 2025
1 parent c0cc70c commit 7552be7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
2 changes: 0 additions & 2 deletions src/main/clojure/clojure/core/async.clj
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@ to catch and handle."
"returns derefable [val port] if immediate, nil if enqueued"
[fret ports opts]
(assert (pos? (count ports)) "alts must have at least one channel operation")
(doseq [port ports :when (vector? port)]
(assert (not (nil? (nth port 1))) "alts can't put nil on channel"))
(let [flag (alt-flag)
ports (vec ports) ;; ensure vector for indexed nth
n (count ports)
Expand Down
7 changes: 0 additions & 7 deletions src/test/clojure/clojure/core/async_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,3 @@
:ok
(catch AssertionError e
:ko))))))

(deftest test-alts-put-nil-invalid
(is
(thrown? AssertionError
(let [c1 (a/chan)
c2 (a/chan)]
(a/alts!! [c1 [c2 nil]])))))

0 comments on commit 7552be7

Please sign in to comment.