Skip to content

[6.4] [Embedded] Prohibit @export(interface) on generic functions#89447

Open
DougGregor wants to merge 4 commits into
swiftlang:release/6.4.xfrom
DougGregor:export-interface-no-generic-func-embedded-6.4
Open

[6.4] [Embedded] Prohibit @export(interface) on generic functions#89447
DougGregor wants to merge 4 commits into
swiftlang:release/6.4.xfrom
DougGregor:export-interface-no-generic-func-embedded-6.4

Conversation

@DougGregor
Copy link
Copy Markdown
Member

@DougGregor DougGregor commented May 26, 2026

  • Explanation: Embedded Swift cannot emit IR for unspecialized generic functions. Diagnose attempts to use @export(interface) on generic functions in Embedded Swift, because it cannot work and causes assertions in IRGen.
  • Scope: Limited to use of a fairly new feature (@export(interface)) in Embedded Swift.
  • Issues: rdar://177755296.
  • Original PRs: Fix @export(interface) for synthesized members and generic functions #89445
  • Risk: Low due to limited scope.
  • Testing: New tests.
  • Reviewers:

Somehow we had missed this restriction before, but it's crucial to
prevent IR generation from trying to emit unspecialized generics.

Fixes rdar://177755296.
@DougGregor DougGregor requested a review from a team as a code owner May 26, 2026 22:25
@DougGregor
Copy link
Copy Markdown
Member Author

@swift-ci please test

@DougGregor
Copy link
Copy Markdown
Member Author

@swift-ci please test

@DougGregor
Copy link
Copy Markdown
Member Author

@swift-ci please test

@DougGregor
Copy link
Copy Markdown
Member Author

@swift-ci please test macOS

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.

1 participant