Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested map destructuring in mx/defn wraps extra collection #1020

Closed
frenchy64 opened this issue Mar 14, 2024 · 0 comments
Closed

Nested map destructuring in mx/defn wraps extra collection #1020

frenchy64 opened this issue Mar 14, 2024 · 0 comments

Comments

@frenchy64
Copy link
Collaborator

The following blows up when instrumented:

(mx/defn foo [{{inner :inner} :outer}]
  inner)
(foo {:outer {:inner true}})

The problem is that the inner map schema is wrapped in an :altn, which turns the outer schema into a [:map [:outer [:altn ...]]]. This turns the inner map into a sequence spec.

There's a potential fix here: #1019

But I'm unsure how this might interact with other features like auto-flattening: #1005

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant