From 5b9b2e09515256e3acb67cebcb180ca081051f75 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Thu, 24 Oct 2024 12:18:28 +0200 Subject: [PATCH] fix integration tests --- src/nbb/core.cljs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/nbb/core.cljs b/src/nbb/core.cljs index c347fed..c58de7c 100644 --- a/src/nbb/core.cljs +++ b/src/nbb/core.cljs @@ -513,9 +513,14 @@ v#))))) (def sci-sym (delay (sci/eval-form (ctx/get-ctx) 'cljs.core/symbol))) +(def sci-var? (delay (sci/eval-form (ctx/get-ctx) 'cljs.core/var?))) (defn ^:macro implements?* [_ _ psym x] - (if-let [resolved (sci/resolve (ctx/get-ctx) psym)] + (if-let [resolved (let [res (sci/resolve (ctx/get-ctx) psym)] + (if (@sci-var? res) + res + ;; workaround for resolve on `my.ns.Protocol` resolving to protocol map + (:name res)))] (let [psym (@sci-sym resolved)] ;; hardcoded implementation of implements? for js-interop destructure which ;; uses implements?