-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add checks for better map assertions #5
Conversation
b255147
to
394c8cf
Compare
@evant, if you have some time to sanity check this conceptually, I'd appreciate it! |
0 errors, 1 warnings""", | ||
) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you care about usages like map.entries.map { it.key }
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. Have you seen that call before in the wild?
It strikes me as odd to iterate the entries to read a set that the map is probably already maintaining internally, but if people do that for whatever reason…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha, honestly I'm not sure; I was mostly trying to find edge cases related to keys.
I think I've written it before, but probably incorrectly 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to merge this, but I created #11 to track interest in something like that over time. I explained a little of my rationale there.
Fixes #3