Skip to content

reject non-comparable keys in map index and in operator#971

Open
netliomax25-code wants to merge 1 commit into
expr-lang:masterfrom
netliomax25-code:map-key-comparable
Open

reject non-comparable keys in map index and in operator#971
netliomax25-code wants to merge 1 commit into
expr-lang:masterfrom
netliomax25-code:map-key-comparable

Conversation

@netliomax25-code
Copy link
Copy Markdown

Indexing a map or testing membership with the in operator both reach v.MapIndex(reflect.ValueOf(key)) in runtime.Fetch/runtime.In, which panics with a raw hash of unhashable type when the key is a slice or map; groupBy(list,0)[reduce(list,B"")] and B"" in groupBy(list,0) trigger it once the map/key is dynamically typed. Check Comparable() before the lookup, matching the groupBy key fix.

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.

1 participant