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

Support more than one function literal #36

Open
vemv opened this issue Mar 26, 2019 · 1 comment
Open

Support more than one function literal #36

vemv opened this issue Mar 26, 2019 · 1 comment

Comments

@vemv
Copy link
Contributor

vemv commented Mar 26, 2019

speced/defn foo [^some? ^named? lang] should generate a (spec/and named? lang?).

(That should be forbidden for keyword specs)

Currently the behavior is to skip one of the passed specs, which is buggy per se (there's some code that attempted to avoid this. Worth reviewing)

@vemv vemv added the bug Something isn't working label Mar 26, 2019
@vemv
Copy link
Contributor Author

vemv commented Apr 8, 2019

^some? ^named? lang cannot be prevented with regular clj code, since the issue happens at reader level: ^{:tag some?} ^{:tag named} lang. The two maps will be merged, and one will 'lose'.

^::some? ^::named? can be fixed though - doing.

In a future, some kind of linter could prevent ^some? ^named? lang (which also is generally desirable: e.g. regular Clojure code may have this bug ^String ^Long x)

@vemv vemv removed the bug Something isn't working label Apr 8, 2019
vemv added a commit that referenced this issue Apr 8, 2019
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