diff --git a/src/clj/coffi/mem.clj b/src/clj/coffi/mem.clj index 5095a59..201f39e 100644 --- a/src/clj/coffi/mem.clj +++ b/src/clj/coffi/mem.clj @@ -781,7 +781,8 @@ aliased type." {:style/indent [:defn]} [new-type aliased-type] - (if (primitive-type aliased-type) + (if (and (s/valid? ::type aliased-type) + (primitive-type aliased-type)) `(let [aliased# ~aliased-type] (defmethod primitive-type ~new-type [_type#] @@ -804,4 +805,4 @@ (deserialize-from segment# aliased#))))) (s/fdef defalias :args (s/cat :new-type qualified-keyword? - :aliased-type ::type)) + :aliased-type any?))