Skip to content

Escalate the warning about the "== Self" type soundness hole to an error #10319

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

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Jun 16, 2017

Swift 3 had a type soundness hole in protocol conformance checking
where the requirement contained an == Self constraint and the
witness was a member of a non-final class. We previously closed the
type soundness hole in PR #9830, but left it as a warning in Swift 3
compatibility mode.

Escalate that warning to an error. The optimizers break due to this
type soundness hole, and of course it can lead to other runtime
breakage because it violates the type system.

Fixes rdar://problem/28601761.

@DougGregor DougGregor requested a review from swiftix June 16, 2017 17:16
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

Copy link
Contributor

@swiftix swiftix left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@swiftix
Copy link
Contributor

swiftix commented Jun 16, 2017

@DougGregor ProcedureKit is a part of the source compatibility suite now. It will likely start failing now that you turned this warning into an error. We may need to XFAIL ProcedureKit until they fix it.

@DougGregor
Copy link
Member Author

Good point.

@DougGregor DougGregor force-pushed the escalate-type-soundness-warning branch from 25b1e81 to b818c33 Compare June 16, 2017 17:46
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

…ror.

Swift 3 had a type soundness hole in protocol conformance checking
where the requirement contained an "== Self" constraint and the
witness was a member of a non-final class. We previously closed the
type soundness hole in PR swiftlang#9830, but left it as a warning in Swift 3
compatibility mode.

Escalate that warning to an error. The optimizers break due to this
type soundness hole, and of course it can lead to other runtime
breakage because it violates the type system.

Fixes rdar://problem/28601761.
@DougGregor
Copy link
Member Author

Too many things going on in one tree.

@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@DougGregor DougGregor force-pushed the escalate-type-soundness-warning branch from b818c33 to 8b80681 Compare June 16, 2017 20:41
@DougGregor DougGregor merged commit 55b3acc into swiftlang:master Jun 16, 2017
@DougGregor DougGregor deleted the escalate-type-soundness-warning branch June 16, 2017 21:06
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