Failing forc unit test: ok_vec_buffer_ownership
With the test uncommented, forc test --path sway-lib-std results in this error:
Verification failed at ok_vec_buffer_ownership::entry
library {
entry fn ok_vec_buffer_ownership() -> (), !4 {
local [u8; 4] __anon_0
local { u64, ( () | u8 ) } __anon_1
local { u64, ( () | u8 ) } __anon_2
local mut { { u64, u64 }, u64 } bytes
local mut { { u64, u64 }, u64 } bytes_
error: Internal compiler error: Verification failed: Struct field type mismatch: (Element type "u64" versus index type Some("u8")).
Please file an issue on the repository and include the code that triggered this error.
It also fails for ok_bytes_buffer_ownership
When fixed, we should uncomment the tests. Thanks @alfiedotwtf for discovering these
@bitzoic @IGI-111 for viz
These tests weren't failing in CI due to https://github.com/FuelLabs/sway/pull/6566
It looks like this is the first instance they failed on master: https://github.com/FuelLabs/sway/actions/runs/10812086601/job/29992938006
From this PR: https://github.com/FuelLabs/sway/pull/6526
cc @xunilrj
Confirmed that changing this section of code back fixes the compiler error. I'm not sure if this is the best fix though. Thoughts?