Fix Value/Ref checks for pattern Index/Range#35004
Merged
agocke merged 2 commits intodotnet:masterfrom Apr 16, 2019
Merged
Conversation
When I implemented the Index and Range pattern support I forgot to update the ref and ref-like checking behavior, which caused the expressions to have the wrong behavior for certain operations and potentially crash the compiler. This change adds tests for ref returns and ref-like lifetimes and implements the appropriate behavior.
7ff523d to
73611f0
Compare
chsienki
reviewed
Apr 16, 2019
chsienki
reviewed
Apr 16, 2019
chsienki
reviewed
Apr 16, 2019
chsienki
reviewed
Apr 16, 2019
src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter.cs
Outdated
Show resolved
Hide resolved
chsienki
approved these changes
Apr 16, 2019
gafter
reviewed
Apr 16, 2019
gafter
reviewed
Apr 16, 2019
gafter
reviewed
Apr 16, 2019
gafter
reviewed
Apr 16, 2019
333fred
added a commit
to 333fred/roslyn
that referenced
this pull request
Apr 17, 2019
* dotnet/master: (495 commits) Roslyn Installer: Stop processes that block VSIX installation. (dotnet#34886) Remove unused helper BeginInvokeOnUIThread Apply a hang mitigating timeout to InvokeOnUIThread Apply a hang mitigating timeout in RestoreNuGetPackages Apply a hang mitigating timeout to WaitForApplicationIdle Fix Value/Ref checks for pattern Index/Range (dotnet#35004) Fix assert in remove unused member analyzer Treat unconstrained type parameters declared in `#nullable disable` context as having an oblivious nullability in case they are substituted with a reference type. (dotnet#34797) Add symbol name to tests. Fix to be the correct name emitted PR feedback Improve IDE0052 diagnostic message for properties with used setter but unused getter Use original definition symbol for fetching control flow graph of generic local functions. Properly treat ambiguous explicit interface implementations (dotnet#34584) Remove the dependence between the order in NullableAnnotation and metadata attribute values (dotnet#34909) Fix warning level test. Fix bootstrap on Linux/Mac (dotnet#34978) disable completion for immediate window commands (dotnet#32631) Updated PreviewWarning color Implement design changes for "pattern" Index/Range indexers (dotnet#34897) Add IVTs to 16.1 version of RemoteLS ...
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.
When I implemented the Index and Range pattern support I forgot to
update the ref and ref-like checking behavior, which caused the
expressions to have the wrong behavior for certain operations and
potentially crash the compiler.
This change adds tests for ref returns and ref-like lifetimes and
implements the appropriate behavior.