Skip to content

Deinit-Devirtualization: fix a crash when trying to de-virtualize a non-copyable generic #74474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

eeckstein
Copy link
Contributor

rdar://129980818

@eeckstein
Copy link
Contributor Author

@swift-ci smoke test

precondition(type.isNominal, "non-copyable non-nominal types not supported, yet")

if !type.isNominal {
// E.g. a non-copyable generic function parameter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment confuses me. Is a Copyable generic parameter “nominal”?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, e.g. func foo<T: ~Copyable>(_ t: T). T is not copyable and not a nominal type

@eeckstein eeckstein merged commit ee65ebb into swiftlang:main Jun 17, 2024
3 checks passed
@eeckstein eeckstein deleted the fix-deinit-devirt branch June 17, 2024 15:02
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