Skip to content

@mybuddymichael /core.clj secret
Last active

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
(ns core-typed-tests.core
(:require [clojure.core.typed :as t]
[clojure.core.typed.async :as ta]
[clojure.core.async :as a]))
(t/typed-deps clojure.core.typed.async)
(t/ann foo [-> nil])
(defn foo []
(a/alts!! [(a/chan) (a/chan)] :priority true)
nil)
(comment
"the annotation for alts!!, according to cf"
(All [x d]
(Fn
[(t/Seqable (U (ta/Port x) [(ta/Port x) x]))
(t/Seqable (ta/Port x))
& {:priority (U true nil)} :mandatory {:default d}
-> (U [x (ta/Port x)] [d (Value :default)])]
[(t/Seqable (U (ta/Port x) [(ta/Port x) x]))
& {:priority (U true nil)}
-> [x (ta/Port x)]]))
)
core-typed-tests.core=> (t/check-ns)
Start collecting core-typed-tests.core
Start collecting clojure.core.typed.async
Finished collecting clojure.core.typed.async
Finished collecting core-typed-tests.core
Collected 2 namespaces in 225.22 msecs
Start checking clojure.core.typed.async
Checked clojure.core.typed.async in 252.916 msecs
Start checking core-typed-tests.core
ExceptionInfo Internal Error (core-typed-tests.core:10:3) Uneven number of keyword arguments provided to polymorphic function with keyword parameters. clojure.core/ex-info (core.clj:4327)
core-typed-tests.core=>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.