A fixed initializer must be bound to its natural type#46293
Merged
gafter merged 3 commits intodotnet:masterfrom Jul 27, 2020
Merged
A fixed initializer must be bound to its natural type#46293gafter merged 3 commits intodotnet:masterfrom
gafter merged 3 commits intodotnet:masterfrom
Conversation
RikkiGibson
reviewed
Jul 24, 2020
| public class Program { | ||
| public static void Test(bool b, IDisposable d) | ||
| { | ||
| using (IDisposable x = b ? d : null) |
Member
There was a problem hiding this comment.
Does the implementation change affect the behavior of this test?
Member
Author
There was a problem hiding this comment.
Yes. It causes the compiler to not crash. Other than that, no.
Member
There was a problem hiding this comment.
I was not able to crash the compiler in the master branch using this scenario. I was able to crash it using the TestFixedConditional scenario above. This seems like a good test to have anyway, though.
Member
Author
There was a problem hiding this comment.
You're right; this test is just a defensive one for a "similar" situation to the one that is actually affected here.
Member
Author
|
Build failures are inherited from the master branch. |
RikkiGibson
approved these changes
Jul 24, 2020
cston
approved these changes
Jul 26, 2020
Member
|
Does this need to go into 16.8-preview1? |
333fred
added a commit
to 333fred/roslyn
that referenced
this pull request
Jul 28, 2020
…-pointers * upstream/master: (207 commits) Update argument state when parameter has not-null type (dotnet#46072) Fix TypeWithAnnotations.ToTypeWithState() for (untyped) null literal (dotnet#46344) Update README (dotnet#46136) Revert "Revert "Support nullable annotations on unconstrained type parameters"" Revert "Support nullable annotations on unconstrained type parameters (dotnet#45993)" Fix type in publish data Update VSIXExpInstaller version to one available on ADO Update publish data for 16.8 Update version of RichCodeNav.EnvVarDump A fixed initializer must be bound to its natural type (dotnet#46293) Update features merged into 16.7p4 (dotnet#46229) Async-streams: disposal should continue without jump within a finally (dotnet#46188) Recommend default in type constraint, but not record (dotnet#46311) Add use site diagnostics to IsUnmanaged (dotnet#46114) Add another flaky test. Ensure NuGet connections use TLS 1.2 Update to Microsoft.CodeAnalysis.Testing 1.0.1-beta1.20374.2 Skip flaky test. Fix build break. (dotnet#46303) Skip a flaky test Relates to dotnet#46304 ...
333fred
added a commit
to 333fred/roslyn
that referenced
this pull request
Jul 28, 2020
…to function-pointer-type-lookup * upstream/features/function-pointers: (212 commits) Correct public API number. Update argument state when parameter has not-null type (dotnet#46072) Fix TypeWithAnnotations.ToTypeWithState() for (untyped) null literal (dotnet#46344) Update README (dotnet#46136) Revert "Revert "Support nullable annotations on unconstrained type parameters"" Revert "Support nullable annotations on unconstrained type parameters (dotnet#45993)" Fix type in publish data Update VSIXExpInstaller version to one available on ADO Update publish data for 16.8 Update version of RichCodeNav.EnvVarDump A fixed initializer must be bound to its natural type (dotnet#46293) Update features merged into 16.7p4 (dotnet#46229) Async-streams: disposal should continue without jump within a finally (dotnet#46188) Recommend default in type constraint, but not record (dotnet#46311) Add use site diagnostics to IsUnmanaged (dotnet#46114) Add another flaky test. Ensure NuGet connections use TLS 1.2 Update to Microsoft.CodeAnalysis.Testing 1.0.1-beta1.20374.2 Skip flaky test. Fix build break. (dotnet#46303) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #46231