-
-
Save mybuddymichael/f584ab905a4165f273e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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)]])) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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