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

Proper nullable support for interpolated string handler constructors and conversions #54583

Closed
333fred opened this issue Jul 3, 2021 · 1 comment
Assignees
Milestone

Comments

@333fred
Copy link
Member

333fred commented Jul 3, 2021

Currently, we do a very basic form of nullable analysis for interpolated string handler conversions. We need to figure out how it will interact with method reinference and property propagate state from the constructor out to other components.

Relates to test plan #51499

@333fred 333fred self-assigned this Jul 3, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Jul 3, 2021
@jaredpar jaredpar removed the untriaged Issues and PRs which have not yet been triaged by a lead label Jul 7, 2021
@jaredpar jaredpar added this to the 17.0 milestone Jul 7, 2021
@jaredpar jaredpar modified the milestones: 17.0, 17.1 Aug 3, 2021
@333fred
Copy link
Member Author

333fred commented Aug 20, 2021

#55701 (comment) is very related, and likely needs to be addressed at the same time to make sure we're not duplicating code across different flow passes.

333fred added a commit to 333fred/roslyn that referenced this issue Nov 15, 2021
…tructors

Fixes dotnet#54583. Arguments with slots are treated like we do receivers: as though the previous argument value has already been loaded, and therefore postcondition attributes do not flow back to the original argument position (the effect of this can be seen in StringInterpolation_14 and _20), but future references to those locations will see the effects of the attribute.

I additionally looked at updating region analysis as part of this PR to see if I could share data between these passes, but I don't believe we can do much sharing here. There's too much nullable-specific with finding the current state of the expression being used for the mapping to work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants