FuelLabs / sway

🌴 Empowering everyone to build reliable and efficient smart contracts.
https://docs.fuel.network/docs/sway/
Apache License 2.0
62.76k stars 5.36k forks source link

Fixed required trait constraint not being checked #6525

Closed esdrubal closed 1 week ago

esdrubal commented 2 weeks ago

Description

An optimization on check_if_trait_constraints_are_satisfied_for_type_inner was making missing trait constraints not being detected.

Fixes #6374.

Checklist

codspeed-hq[bot] commented 2 weeks ago

CodSpeed Performance Report

Merging #6525 will not alter performance

Comparing esdrubal/fix_additional_constraints (44a5d0d) with master (15c8298)

Summary

✅ 22 untouched benchmarks

sdankel commented 1 week ago

Should we add a test of the repro from the original issue?

esdrubal commented 1 week ago

Should we add a test of the repro from the original issue?

Thanks for noticing, I added the missing test.