Skip to content

[6.4] SILGenApply: Pick up lifetime dependencies from inner function type in static methods.#90097

Open
jckarter wants to merge 1 commit into
swiftlang:release/6.4.xfrom
jckarter:afd-static-method-6.4
Open

[6.4] SILGenApply: Pick up lifetime dependencies from inner function type in static methods.#90097
jckarter wants to merge 1 commit into
swiftlang:release/6.4.xfrom
jckarter:afd-static-method-6.4

Conversation

@jckarter

Copy link
Copy Markdown
Contributor

Explanation: Fixes a bug where calls into static methods with lifetime dependencies would raise incorrect lifetime dependency errors in some circumstances.

Scope: Bug fix.

Issue: rdar://179057474

Risk: Low. There is a small fix to match SILGen's handling of lifetime dependencies to how they are encoded in the AST for static methods.

Reviewed by: @aidan-hall, @kavon

Testing: Swift CI, test case from bug report

…n static methods.

A static method's AST type gets its lifetime dependencies stuck on the inner function type, as in
`(Self.Type) -> @_lifetime (Args...) -> Return`, but SILGenApply was not looking for it there
when passing the lifetime dependencies down to CallEmission. Fix for rdar://179057474.
@jckarter jckarter requested a review from a team as a code owner June 22, 2026 15:21
@jckarter

Copy link
Copy Markdown
Contributor Author

@swift-ci Please test

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