Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix CTYP-45 with test.

  • Loading branch information...
commit f65a3d20ac35c955c1014c79c72167c480f9509d 1 parent 45854d7
@frenchy64 frenchy64 authored
View
5 src/test/clojure/clojure/core/typed/test/core.clj
@@ -1891,6 +1891,11 @@
(is (cf (fn [a] (:a a))
[Nothing -> Any])))
+(deftest plain-defprotocol-test
+ (is (u/top-level-error-thrown? (cf (defprotocol Foo (bar [this])))))
+ (is (u/top-level-error-thrown?
+ (check-ns 'clojure.core.typed.test.fail.CTYP-45))))
+
;(reset-caches)
;(chk/abstract-result
View
10 src/test/clojure/clojure/core/typed/test/fail/CTYP_45.clj
@@ -0,0 +1,10 @@
+(ns clojure.core.typed.test.fail.CTYP-45
+ (:require [clojure.core.typed :as t]))
+
+; using defprotocol shouldn't throw an internal error
+
+(t/ann-protocol MyProto
+ foo
+ [MyProto -> nil])
+(defprotocol MyProto
+ (foo [my-proto]))
Please sign in to comment.
Something went wrong with that request. Please try again.