Skip to content

Relax an assert in witness access diagnostics #28244

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 14, 2019

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Nov 13, 2019

#22235 added an assert that was a little overzealous about
the structure of access control attributes in the AST. It used to
always expect that we reached diagnoseWitnessFixAccessLevel when there
was an explicit mismatch in user-written access markers. But declarations
may also have their access levels rewritten and their access attributes
stripped if they are invalid. If you can get all of these to occur by
the time you diagnose the witness, you see no attribute for a witness
with insufficient ACLs for a requirement and crash.

Relax the assert by using the formal access level and resolve rdar://56818960

swiftlang#22235 added an assert that was a little overzealous about
the structure of access control attributes in the AST.  It used to
always expect that we reached diagnoseWitnessFixAccessLevel when there
was an explicit mismatch in user-written access markers.  But declarations
may also have their access levels rewritten and their access attributes
stripped if they are invalid.  If you can get all of these to occur by
the time you diagnose the witness, you see no attribute for a witness
with insufficient ACLs for a requirement and crash.

Relax the assert by using the formal access level and resolve rdar://56818960
@CodaFi
Copy link
Contributor Author

CodaFi commented Nov 13, 2019

@swift-ci please smoke test and merge

@CodaFi
Copy link
Contributor Author

CodaFi commented Nov 14, 2019

Infrastructure outage

@swift-ci please smoke test

@swift-ci swift-ci merged commit e91a41a into swiftlang:master Nov 14, 2019
@CodaFi CodaFi deleted the pavane-pour-une-infante-default branch November 14, 2019 01:56
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