From fa946e8d9e952a84ac167bee3d4801d4553af604 Mon Sep 17 00:00:00 2001 From: JarrodCTaylor Date: Fri, 20 Oct 2023 12:06:16 -0500 Subject: [PATCH] Updated metadata processing to support arg-tags in 1.12 --- src/main/cljs/cljs/tools/reader/impl/errors.cljs | 2 +- src/main/cljs/cljs/tools/reader/impl/utils.cljs | 1 + src/main/clojure/clojure/tools/reader/impl/errors.clj | 2 +- src/main/clojure/clojure/tools/reader/impl/utils.clj | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/cljs/cljs/tools/reader/impl/errors.cljs b/src/main/cljs/cljs/tools/reader/impl/errors.cljs index 4e8c5c1..418defb 100644 --- a/src/main/cljs/cljs/tools/reader/impl/errors.cljs +++ b/src/main/cljs/cljs/tools/reader/impl/errors.cljs @@ -187,7 +187,7 @@ rdr "Metadata cannot be " (i/inspect x) - ". Metadata must be a Symbol, Keyword, String or Map.")) + ". Metadata must be a Symbol, Keyword, String, Map or Vector.")) (defn throw-bad-metadata-target [rdr target] (reader-error diff --git a/src/main/cljs/cljs/tools/reader/impl/utils.cljs b/src/main/cljs/cljs/tools/reader/impl/utils.cljs index 12a0650..d57c474 100644 --- a/src/main/cljs/cljs/tools/reader/impl/utils.cljs +++ b/src/main/cljs/cljs/tools/reader/impl/utils.cljs @@ -68,6 +68,7 @@ (keyword? f) {f true} (symbol? f) {:tag f} (string? f) {:tag f} + (vector? f) {:arg-tags f} :else f)) (def last-id (atom 0)) diff --git a/src/main/clojure/clojure/tools/reader/impl/errors.clj b/src/main/clojure/clojure/tools/reader/impl/errors.clj index 38cbe25..f77d496 100644 --- a/src/main/clojure/clojure/tools/reader/impl/errors.clj +++ b/src/main/clojure/clojure/tools/reader/impl/errors.clj @@ -171,7 +171,7 @@ rdr "Metadata cannot be " (i/inspect x) - ". Metadata must be a Symbol, Keyword, String or Map.")) + ". Metadata must be a Symbol, Keyword, String, Map or Vector.")) (defn throw-bad-metadata-target [rdr target] (reader-error diff --git a/src/main/clojure/clojure/tools/reader/impl/utils.clj b/src/main/clojure/clojure/tools/reader/impl/utils.clj index be64e5f..a59eb81 100644 --- a/src/main/clojure/clojure/tools/reader/impl/utils.clj +++ b/src/main/clojure/clojure/tools/reader/impl/utils.clj @@ -99,6 +99,7 @@ (keyword? f) {f true} (symbol? f) {:tag f} (string? f) {:tag f} + (vector? f) {:arg-tags f} :else f)) (defn make-var