Skip to content
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

[CoroutineAccessors] Don't skip type-checking synthesized default implementations. #77661

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nate-chandler
Copy link
Contributor

Such bodies should be type-checked and emitted by SILGen accordingly.

Always type-check the bodies of default implementations for `read2` and
`modify2` requirements.
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please test source compatibility

@nate-chandler
Copy link
Contributor Author

@swift-ci please apple silicon benchmark

@@ -938,24 +938,29 @@ buildIndexForwardingParamList(AbstractStorageDecl *storage,
return ParameterList::create(context, elements);
}

bool AccessorDecl::isRequirementWithSynthesizedDefaultImplementation() const {
Copy link
Contributor

Choose a reason for hiding this comment

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

Methods declared in include/AST should be implemented in lib/AST

Copy link
Contributor

Choose a reason for hiding this comment

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

(You can define a new request to break AST <-> Sema cycles)

@slavapestov
Copy link
Contributor

Why do these need to be emitted even if we're skipping function bodies otherwise?

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