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

Fix unbound args #288

Merged
merged 2 commits into from
Apr 6, 2024
Merged

Fix unbound args #288

merged 2 commits into from
Apr 6, 2024

Conversation

schillic
Copy link
Member

@schillic schillic commented Mar 2, 2024

Closes #284.

The old code seemed to work with mixed types at first glance, but it did not. The type parameter N was not automatically inferred:

julia> ResetMap(10, Dict(2 => -1.0, 5 => 1))  # on master
ERROR: MethodError: no method matching ResetMap(::Int64, ::Pair{Int64, Float64}, ::Pair{Int64, Int64})

The new code works and fixes the unbound arg warning.

The tests only compare the Dict because we do not have == methods available.

@schillic schillic changed the title Fix loose type parameters Fix unbound args Mar 2, 2024
@schillic schillic marked this pull request as ready for review March 2, 2024 11:06
@schillic schillic merged commit 2291fe0 into master Apr 6, 2024
7 checks passed
@schillic schillic deleted the schillic/284 branch April 6, 2024 09:14
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.

Fix unbound args
1 participant