Skip to content

Sema: Fix incorrect assert in TypeCheckProtocol.cpp. #65667

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

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented May 4, 2023

We can't assume that we will always find a viable witness for a protocol requirement when typechecking a .swiftinterface file. The assert that assumed there would be a match could fail when building a broken interface or building a valid interface with a broken SDK, causing crashes instead of emitting diagnostics.

Resolves rdar://108688535

@tshortli
Copy link
Contributor Author

tshortli commented May 4, 2023

@swift-ci please test

We can't assume that we will always find a viable witness for a protocol
requirement when typechecking a `.swiftinterface` file. The assert that assumed
there would be a match could fail when building a broken interface or building
a valid interface with a broken SDK, causing crashes instead of emitting
diagnostics.

Resolves rdar://108688535
@tshortli tshortli force-pushed the swiftinterface-missing-conformance-req-assert branch from 787c18a to ba422f9 Compare May 4, 2023 23:26
@tshortli
Copy link
Contributor Author

tshortli commented May 4, 2023

@swift-ci please test

@tshortli
Copy link
Contributor Author

tshortli commented May 5, 2023

@swift-ci please test Linux

@tshortli
Copy link
Contributor Author

tshortli commented May 5, 2023

@swift-ci please test Windows

@tshortli tshortli merged commit b12537f into swiftlang:main May 5, 2023
@tshortli tshortli deleted the swiftinterface-missing-conformance-req-assert branch May 5, 2023 16: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