Skip to content

Instantly share code, notes, and snippets.

@arohner
Created March 28, 2014 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arohner/9836337 to your computer and use it in GitHub Desktop.
Save arohner/9836337 to your computer and use it in GitHub Desktop.
core.typed bug?
(ns circle.scratch
(:require [clojure.core.typed :as t]))
(t/ann foo [t/Int -> Boolean])
(defn foo [x]
true)
(t/ann bar [& :optional {x t/Int} -> Boolean])
(defn bar [& {:keys [x]
:or {x 3}}]
(foo x))
@arohner
Copy link
Author

arohner commented Mar 28, 2014

Type Error (circle/scratch.clj:11:3) Type mismatch:

Expected:   t/Int

Actual:     Any
in: (circle.scratch/foo x)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment