From 634f37114428c130267a8ed772ae8a59f33ee8c2 Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Tue, 18 Jan 2022 14:00:00 -0600 Subject: [PATCH] Throw an exception on testing invalid type objects --- src/clj/coffi/mem.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/clj/coffi/mem.clj b/src/clj/coffi/mem.clj index 79306fa..42394ad 100644 --- a/src/clj/coffi/mem.clj +++ b/src/clj/coffi/mem.clj @@ -515,7 +515,8 @@ [type] (cond (qualified-keyword? type) type - (sequential? type) (keyword (first type)))) + (sequential? type) (keyword (first type)) + :else (throw (ex-info "Invalid type object" {:type type})))) (def primitive? "A set of all primitive types."