这是indexloc提供的服务,不要输入任何密码
Skip to content

Allow #:combine and #:combine/key #1288

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

Merged
merged 1 commit into from
Oct 24, 2022
Merged

Conversation

bdeket
Copy link
Contributor

@bdeket bdeket commented Oct 19, 2022

for hash-union, hash-union! and hash-intersect

See also: https://racket.discourse.group/t/type-checker-inference-for-polymorphic-keyword-functions-not-supported/145/5

maybe related: following failing test was recently added but I think the first hash should be #hash(). However I could be wrong about what is being tested

(hash-union (make-hash) (make-hash) #:combine (lambda (a b) a))

for hash-union, union! and intersect
@capfredf
Copy link
Member

The test is to ensure that doing type inference for invoking hash-union with keyword arguments raises a type error instead of an internal error.

@bdeket
Copy link
Contributor Author

bdeket commented Oct 24, 2022

I just wanted to point out that the current test will always fail, because hash-union expects an immutable hash as first argument. which is of course different than an internal error.
Also thank you for running the tests again.

@capfredf
Copy link
Member

Thanks. Currently, the type checker only throws the inference error, but I should change those two arguments to #hash().

@capfredf capfredf merged commit da8a5af into racket:master Oct 24, 2022
@bdeket bdeket deleted the hash-union branch November 4, 2022 06:36
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

Successfully merging this pull request may close these issues.

2 participants