Skip to content

Fix the SIL type equality assert failures due to opaque return types. #70865

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

Closed
wants to merge 1 commit into from

Conversation

hjyamauchi
Copy link
Contributor

We encountered several SIL type equality assert failures in our internal app and reduced them into the included test.

The issue seemed to be that some places have the opaque return type and other places have the opaque types' underlying types and the type equality asserts fail. This change adds some logic to replace the opaque types with their underlying types, absorb the differences and avoid the assert failures.

We encountered several SIL type equality assert failures in our
internal app and reduced them into the included test.

The issue seemed to be that some places have the opaque return type
and other places have the opaque types' underlying types and the type
equality asserts fail. This change adds some logic to replace the
opaque types with their underlying types, absorb the differences and
avoid the assert failures.
@hjyamauchi hjyamauchi requested a review from compnerd January 12, 2024 01:16
@compnerd compnerd requested a review from jckarter January 12, 2024 01:30
@slavapestov
Copy link
Contributor

The reduced test case is valuable but simply loosening assertions is rarely the correct fix. We ought to understand if the opaque return types are not being properly substituted elsewhere.

@hjyamauchi
Copy link
Contributor Author

@slavapestov Do you have any suggestions where to look, some tests to run, or something on how to check that the opaque return types are properly substituted? I don't currently have a great sense of what may need to happen somewhere.

@hjyamauchi
Copy link
Contributor Author

hjyamauchi commented Jan 24, 2024

The issue was fixed by 8d649a2
Dropping this PR

@hjyamauchi hjyamauchi closed this Jan 24, 2024
@slavapestov
Copy link
Contributor

@hjyamauchi Your test case is still valuable though. Do you mind putting up a PR with just the new test?

@hjyamauchi
Copy link
Contributor Author

@slavapestov Assuming you mean just the test part from this PR (which is fixed by 8d649a2), yeah I will.

hjyamauchi added a commit to hjyamauchi/swift that referenced this pull request Jan 26, 2024
…turn types.

This is the test part of swiftlang#70865
which was fixed by the commit
swiftlang@8d649a2
@hjyamauchi
Copy link
Contributor Author

Created this PR for the test: #71187

hjyamauchi added a commit to hjyamauchi/swift that referenced this pull request Jan 29, 2024
…turn types

This is the test part of swiftlang#70865 which was fixed by the commit swiftlang@8d649a2
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