Skip to content

Conversation

@xunilrj
Copy link
Contributor

@xunilrj xunilrj commented Nov 13, 2025

Description

This PR is continuation of #7483.

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.

Note

Rejects const generics in configurables and reuses a new TypeId::has_const_generics for ABI/configurable checks; updates failing test to cover configurable case.

  • Type System:
    • Add TypeId::has_const_generics(engines) to detect const generics across nested types.
  • ABI:
    • Replace local const-generic checker with type_id.has_const_generics(engines) in TyAbiDecl::forbid_const_generics.
  • Configurables:
    • Add TyConfigurableDecl::forbid_const_generics and enforce it during type checking in TyDecl::type_check.
  • Tests:
    • Extend should_fail/unsupported_const_generics with a configurable using const generics and update snapshot to include the new error and shifted line numbers.

Written by Cursor Bugbot for commit d6514cb. This will update automatically on new commits. Configure here.

@xunilrj xunilrj self-assigned this Nov 13, 2025
@xunilrj xunilrj requested a review from a team as a code owner November 13, 2025 13:36
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 13, 2025

CodSpeed Performance Report

Merging #7494 will not alter performance

Comparing xunilrj/forbid-const-generics-configurables (d6514cb) with master (fb10b2f)

Summary

✅ 25 untouched

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants