use crash to clearify unreachable state

This commit is contained in:
Brendan Hansknecht 2022-12-02 10:54:49 -08:00
parent b4b18cda5a
commit ae58623f70
No known key found for this signature in database
GPG Key ID: 0EA784685083E75B

View File

@ -519,8 +519,7 @@ swapAndUpdateDataIndex = \@Dict { metadata, dataIndices, data, size }, removedIn
Err NotFound ->
# This should be impossible.
# TODO: Maybe crash, it would be a standard library bug?
@Dict { metadata, dataIndices, data, size }
crash "unreachable state in dict swapAndUpdateDataIndex hit. Definitely a standard library bug."
insertNotFoundHelper : Dict k v, k, v, U64, I8 -> Dict k v
insertNotFoundHelper = \@Dict { metadata, dataIndices, data, size }, key, value, h1Key, h2Key ->