Skip to content

Conversation

@slavapestov
Copy link
Contributor

If we can see the underlying type of an opaque return type, and this underlying type does not depend on the opaque return type's generic signature, then we can end up in a situation where the lowered type of a re-abstraction thunk is not generic, but the formal type is.

This would trigger an assertion failure. Check both the lowered type and formal type for type parameters to cope with this.

…volving opaque return type

If we can see the underlying type of an opaque return type, and this
underlying type does not depend on the opaque return type's generic
signature, then we can end up in a situation where the lowered type
of a re-abstraction thunk is not generic, but the formal type is.

This would trigger an assertion failure. Check both the lowered type
and formal type for type parameters to cope with this.

- Fixes swiftlang#86118.
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test macOS

@slavapestov
Copy link
Contributor Author

@swift-ci Please test Windows

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please test Windows

@slavapestov
Copy link
Contributor Author

@swift-ci Please test Windows

@slavapestov slavapestov merged commit acd5a76 into swiftlang:main Dec 19, 2025
3 checks passed
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.

SILGen assertion failure with ForEach(Array(enumerated())) in SwiftUI View

1 participant