File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
main/clojure/clojure/core
test/clojure/clojure/core Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 22
22
; ; clj -M:outdated
23
23
:outdated {:extra-deps {com.github.liquidz/antq {:mvn/version " 2.11.1250" }}
24
24
:main-opts [" -m" " antq.core" ]}
25
+
26
+ ; ; Regenerate docs in docs/
27
+ ; ; clj -X:docs
28
+ :docs {:extra-deps {codox/codox {:mvn/version " 0.10.8" }}
29
+ :exec-fn codox.main/generate-docs
30
+ :exec-args {:source-paths [" src/main/clojure" ]
31
+ :namespaces [clojure.core.async clojure.core.async.flow clojure.core.async.flow.spi]
32
+ :output-path " apidocs" }}
25
33
}}
Original file line number Diff line number Diff line change @@ -277,6 +277,8 @@ to catch and handle."
277
277
" returns derefable [val port] if immediate, nil if enqueued"
278
278
[fret ports opts]
279
279
(assert (pos? (count ports)) " alts must have at least one channel operation" )
280
+ (doseq [port ports :when (vector? port)]
281
+ (assert (not (nil? (nth port 1 ))) " alts can't put nil on channel" ))
280
282
(let [flag (alt-flag )
281
283
ports (vec ports) ; ; ensure vector for indexed nth
282
284
n (count ports)
Original file line number Diff line number Diff line change 465
465
:ok
466
466
(catch AssertionError e
467
467
:ko ))))))
468
+
469
+ (deftest test-alts-put-nil-invalid
470
+ (is
471
+ (thrown? AssertionError
472
+ (let [c1 (a/chan )
473
+ c2 (a/chan )]
474
+ (a/alts!! [c1 [c2 nil ]])))))
You can’t perform that action at this time.
0 commit comments