Skip to content

allow discard in generic noncopyable type #65896

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
May 13, 2023

Conversation

kavon
Copy link
Member

@kavon kavon commented May 12, 2023

A bug was preventing you from writing discard self in a consuming method of a generic noncopyable type.

The main cause was the isPureMoveOnly ignored
unbound generic types, claiming none of them are
noncopyable. Then I also needed to pass the contextual type with the vars bound to the type checker.

rdar://108975216

A bug was preventing you from writing `discard self`
in a consuming method of a generic noncopyable type.

The main cause was the `isPureMoveOnly` ignored
unbound generic types, claiming none of them are
noncopyable. Then I also needed to pass the contextual
type with the vars bound to the type checker.

rdar://108975216
@kavon
Copy link
Member Author

kavon commented May 12, 2023

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit 7c3e480 into swiftlang:main May 13, 2023
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.

3 participants