Skip to content

Conversation

ironcev
Copy link
Member

@ironcev ironcev commented Sep 5, 2025

Description

This PR removes the ConvertParseThreeError::SelfImplForContract and the unreachable code branch that was emiting it.

#7275 introduces self impls for contracts and transforms every impl Contract into impl <GeneratedAbiName> for Contract which makes the SelfImplForContract error obsolete and the match arm that was emitting it unreachable.

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@ironcev ironcev self-assigned this Sep 5, 2025
@ironcev ironcev added compiler General compiler. Should eventually become more specific as the issue is triaged compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: parser Everything to do with the parser labels Sep 5, 2025
@ironcev ironcev changed the title Remove emitting of ConvertParseThreeError::SelfImplForContract error Remove emitting of ConvertParseThreeError::SelfImplForContract Sep 5, 2025
Copy link

codspeed-hq bot commented Sep 5, 2025

CodSpeed Performance Report

Merging #7375 will improve performances by 20.9%

Comparing ironcev/remove-self-impl-for-contract-error (4d2822f) with master (1f9880f)

Summary

⚡ 1 improvements
✅ 24 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
code_lens 5.8 µs 4.8 µs +20.9%

@ironcev ironcev marked this pull request as ready for review September 5, 2025 15:07
@ironcev ironcev requested a review from a team as a code owner September 5, 2025 15:07
@ironcev ironcev enabled auto-merge (squash) September 5, 2025 15:07
@ironcev ironcev requested a review from a team September 5, 2025 15:08
@ironcev ironcev merged commit c2696d6 into master Sep 6, 2025
41 checks passed
@ironcev ironcev deleted the ironcev/remove-self-impl-for-contract-error branch September 6, 2025 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: parser Everything to do with the parser compiler General compiler. Should eventually become more specific as the issue is triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants