FuelLabs / sway

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

Adds type inference from trait implementations. #6590

Closed esdrubal closed 3 weeks ago

esdrubal commented 1 month ago

Description

When we have a type annotation with placeholders and we assign to it the result of a trait implementation call, if there is a single possible trait implementation we can use its type in the type annotation type.

Fixes #5299

Checklist

codspeed-hq[bot] commented 1 month ago

CodSpeed Performance Report

Merging #6590 will not alter performance

Comparing esdrubal/5259 (2589871) with master (6b05844)

Summary

✅ 22 untouched benchmarks