Skip to content

RequirementMachine: Fix some trivial problems running validation tests with -requirement-machine-inferred-signatures=verify #41324

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

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Feb 10, 2022

This fixes 33 out of 100 validation-test failures.

…ss and concrete type requirements

In the long run it doesn't really matter if we leave them in there, but for now
matching the GenericSignatureBuilder's behavior makes the tests pass with
-requirement-machine-inferred-signatures=verify.
…of a GenericParamList

These come up in SIL and in the experimental named opaque result types
implementation. Pass the correct DeclContext here, instead of using
the ModuleDecl.
@slavapestov slavapestov requested a review from hborla February 10, 2022 22:25
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@hborla The change to desugarConformanceRequirement() might impact your work slightly.

If we call TypeRepr::setInvalid() we need to return an ErrorType, because
we'll return an ErrorType if this same TypeRepr is resolved again.

This just makes the RequirementMachine's behavior match the
GenericSignatureBuilder on some highly-invalid compiler_crashers.
…tiableAttr

We forgot to handle this case, which would lead to a crash.
@slavapestov slavapestov force-pushed the rqm-trivial-validation-test-fixes branch from 8962105 to 1244b17 Compare February 11, 2022 01:00
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test macOS

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test macOS

@slavapestov slavapestov merged commit a7c698c into swiftlang:main Feb 11, 2022
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.

1 participant