Create a gist now

Instantly share code, notes, and snippets.

@mybuddymichael /core.clj Secret
Last active Dec 22, 2015

What would you like to do?
(ns core-typed-tests.core
(:require [clojure.core.typed :as t]))
(t/ann-protocol PMaths
mult-by-two [PMaths -> PMaths])
(t/defprotocol> PMaths
(mult-by-two [this]))
(t/ann-record SpecialNumber [x := Number])
(defrecord SpecialNumber [x]
(mult-by-two [this] (assoc this :x (* (:x this) 2))))
core-typed-tests.core=> (t/check-ns)
Initializing core.typed ...
"Elapsed time: 3741.074 msecs"
core.typed initialized.
Start collecting core-typed-tests.core
Finished collecting core-typed-tests.core
Collected 1 namespaces in 3837.122 msecs
Start checking core-typed-tests.core
ClassNotFoundException core_typed_tests.core.SpecialNumber$ (
core-typed-tests.core=> (clojure.repl/pst)
ClassNotFoundException core_typed_tests.core.SpecialNumber$ ( ( (
java.lang.ClassLoader.loadClass (
sun.misc.Launcher$AppClassLoader.loadClass (
java.lang.ClassLoader.loadClass (
java.lang.Class.forName0 (
java.lang.Class.forName (
clojure.core.typed.utils/symbol->Class (utils.clj:334)
clojure.core.typed.subtype/datatype-ancestors (subtype.clj:881)
clojure.core.typed.subtype/subtype-datatype-and-protocol (subtype.clj:952)
clojure.core.typed.subtype/subtypeA*/fn--10864 (subtype.clj:439)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment