Welcome! Please see the About page for a little more info on how this works.

+3 votes
in core.match by
retagged by

When passed a map with a string key containing a slash character, clojure.core.match/match errors during macro expansion.

This happens in both Clojure and Clojurescript.

Example:

$ clj -Sdeps '{:deps {org.clojure/core.match {:mvn/version "1.0.0"}}}'

Clojure 1.10.3
user=> (require '[clojure.core.match :as match])
nil

user=> (match/match {} {"a/b" x} x)
Syntax error macroexpanding clojure.core/let at (REPL:1:1).
ocr-1539_a/b__1543 - failed: simple-symbol? at: [:bindings :form :local-symbol] spec: :clojure.core.specs.alpha/local-name

user=> (match/match {"a/b" 0} {"a/b" x} x)
Syntax error macroexpanding clojure.core/let at (REPL:1:1).
ocr-1545_a/b__1549 - failed: simple-symbol? at: [:bindings :form :local-symbol] spec: :clojure.core.specs.alpha/local-name

Expected behavior: it should be possible to match on all strings, even if they contain special characters.

1 Answer

0 votes
by
...