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 putIfAbsent / rec_insertif in case of an LNode and current node value is None (instead of null). #25

Merged
merged 1 commit into from
Aug 21, 2019

Conversation

mikesajak
Copy link

This small code change fixes the handling of LNode "KEY_ABSENT" case when adding element to TrieMap. The problem is that getting current value from node (from it's internal ListMap) can never return null. It will return either Some or None. So the current check for null will not add element to node if that get will return None falsely assuming that element already exists.
In the scala source version there is also only pattern match for None and Some.

@romix
Copy link
Owner

romix commented Aug 21, 2019

Thanks for the fix!

@romix romix merged commit 145f528 into romix:master Aug 21, 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

Successfully merging this pull request may close these issues.

None yet

2 participants