Skip to content

Conversation

@jack-williams
Copy link
Collaborator

@jack-williams jack-williams commented Sep 2, 2019

Fixes #32809

With this PR void variables are now assumed to be initialised, removing the possibility of used for assigned errors.

To assume a void variable is always assigned is nonsensical, but it's even more nonsensical to report errors based on whether it has, or has not, been assigned to.

This has the consequence that void is no longer narrowed under inequality.

@orta
Copy link
Contributor

orta commented Sep 11, 2019

OK, yep, I think I grok all this and it looks good to me. 👍

Thanks Jack

@orta orta merged commit 7435425 into microsoft:master Sep 11, 2019
@jack-williams jack-williams deleted the fix-32809 branch September 11, 2019 19:34
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent/broken narrowing of void

2 participants