You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HashMap.remove lowers to raw presence flag instead of Option[V] #80
remove("x") should return Some(9), so .unwrap() yields 9 and the map length becomes 0.
Actual
The program fails at runtime because remove("x") is not materialized as an Option[i32] value.
The same bug is visible through borrowed receivers too:
let map_mut_ref = &mut map_mut
assert(map_mut_ref.remove("x").unwrap() == 9)
Root cause
Codegen for MIR_INTRINSIC_MAP_REMOVE in src/CodegenDispatch.w returns the raw result of with_hashmap_remove directly. That runtime function returns a found/present flag, not the removed value wrapped as Option[V].
By contrast, MIR_INTRINSIC_MAP_GET in the same file explicitly builds Option[V] from the runtime result.
Activity
Fix #80 HashMap.remove option lowering
test(windows): un-skip sealed_trait_match now that dyn-trait fat poin…
test(windows): un-skip sealed_trait_match now that dyn-trait fat poin…
codegen(win64): materialize dyn-trait fat pointers, sync + async (#806)…