Skip to content

[TypeChecker] Do not attempt to skip typechecking for didSet #34569

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
merged 1 commit into from
Nov 5, 2020

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Nov 4, 2020

15f8eb4 (see PR#26632) introduced
refined didSet semantics where the oldValue parameter is skipped if it
isn't used. This would perform typechecking, but later try to set the
body to skipped and thus fire an assert.

For now, do not attempt to skip typechecking of didSet accessors. Still
skip outputting their SIL though.

@bnbarham bnbarham requested review from theblixguy and CodaFi November 4, 2020 01:33
@bnbarham bnbarham force-pushed the do-not-skip-didset-typechecking branch from 5a6299b to 12683c1 Compare November 4, 2020 01:35
@bnbarham
Copy link
Contributor Author

bnbarham commented Nov 4, 2020

@swift-ci please test

Copy link
Contributor

@CodaFi CodaFi left a comment

Choose a reason for hiding this comment

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

Thanks!

@compnerd
Copy link
Member

compnerd commented Nov 4, 2020

@swift-ci please test Windows platform

@swift-ci
Copy link
Contributor

swift-ci commented Nov 4, 2020

Build failed
Swift Test OS X Platform
Git Sha - 12683c1b5ccb221cb10a41d77572da173b70de62

@bnbarham
Copy link
Contributor Author

bnbarham commented Nov 4, 2020

@swift-ci please test OS X platform

15f8eb4 (see PR#26632) introduced
refined didSet semantics where the `oldValue` parameter is skipped if it
isn't used. This would perform typechecking, but later try to set the
body to skipped and thus fire an assert.

For now, do not attempt to skip typechecking of didSet accessors. Still
skip outputting their SIL though.
@bnbarham bnbarham force-pushed the do-not-skip-didset-typechecking branch from 12683c1 to ea365d5 Compare November 5, 2020 01:27
@bnbarham
Copy link
Contributor Author

bnbarham commented Nov 5, 2020

I fixed up the test so that it does the correct CHECK-NOT now :).

@bnbarham
Copy link
Contributor Author

bnbarham commented Nov 5, 2020

@swift-ci please smoke test

@CodaFi
Copy link
Contributor

CodaFi commented Nov 5, 2020

@CodaFi CodaFi merged commit 20f0d96 into swiftlang:main Nov 5, 2020
@bnbarham bnbarham deleted the do-not-skip-didset-typechecking branch November 5, 2020 20:27
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.

6 participants