Skip to content

[Sema] Protect dereferencing null TypeReprs in associated type diagnostics #36055

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
Feb 23, 2021

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Feb 19, 2021

rdar://74446387

@xymus
Copy link
Contributor Author

xymus commented Feb 19, 2021

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor

Can you add a test case?

@xymus
Copy link
Contributor Author

xymus commented Feb 19, 2021

We should be able to reproduce the failure if the default type is read from a serialized module. But I don't know how to actually trigger this diagnostic, it doesn't appear to be tested currently even for normal source files.

@slavapestov Would you know how to trigger an associated type inference ambiguity that involves the default type to get a diag::associated_type_deduction_default?

@xymus
Copy link
Contributor Author

xymus commented Feb 19, 2021

@swift-ci Please smoke test

2 similar comments
@xymus
Copy link
Contributor Author

xymus commented Feb 22, 2021

@swift-ci Please smoke test

@xymus
Copy link
Contributor Author

xymus commented Feb 23, 2021

@swift-ci Please smoke test

@xymus
Copy link
Contributor Author

xymus commented Feb 23, 2021

@swift-ci Please smoke test Windows

@xymus xymus merged commit ca0f638 into swiftlang:main Feb 23, 2021
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