Update indexers based on analyzer receiver#34134
Merged
jcouv merged 3 commits intodotnet:masterfrom Mar 17, 2019
Merged
Conversation
cston
reviewed
Mar 15, 2019
src/Compilers/CSharp/Test/Semantic/Semantics/NullableReferenceTypesTests.cs
Show resolved
Hide resolved
Member
|
Done review pass (commit 1) #Resolved |
cston
reviewed
Mar 15, 2019
| C<T> this[T index] { get => throw null!; set => throw null!; } | ||
|
|
||
| C<U> L<U>(U u) => null!; | ||
| }", options: WithNonNullTypesTrue()); |
Contributor
There was a problem hiding this comment.
Minor point: It's a little confusing reading these tests when there are a number of instance methods where the receiver is unused and generic methods where the type parameters are unused. For instance, I believe this could be written as:
class C<T>
{
public T Field = default!;
public C<T> this[T index] { get => throw null!; set => throw null!; }
}
class Program
{
static void M(object? o, object o2)
{
//...
}
static C<U> L<U>(U u) => null!;
}
``` #Resolved
cston
approved these changes
Mar 15, 2019
Member
Author
|
@333fred Did you mean to approve, or did you have some feedback? Thanks |
Member
Author
|
Hum, I getting an error on Linux branch with We expect |
333fred
added a commit
to 333fred/roslyn
that referenced
this pull request
Mar 19, 2019
* dotnet/master: (345 commits) Update indexers based on analyzer receiver (dotnet#34134) Skip test DecimalBinaryOp_03 (dotnet#34199) Remove earlier nullable documentation (dotnet#34153) Rewrite FindReferencesTests as theories Apply a hang mitigating timeout to ExecuteCommand Warn on __refvalue null dereference: (dotnet#34135) Update dependencies from https://github.com/dotnet/arcade build 20190312.7 (dotnet#34112) Update vs branch for 16.1 Fix struct layout error when nullable enabled: (dotnet#34128) Remove IgnoreInsignificantNullableModifiersDifference (dotnet#34096) Add the correct nullable annotations to generated iterator code (dotnet#33986) Move Rename implementation to new fully loaded document API. handle encapsulate field command change the way extract method handle partial load handle orangize document Add back Go to definition method. Revert "Move Go to definition to new fully loaded document API." Revert "Move Find references implementation to new fully loaded document API." Move Find references implementation to new fully loaded document API. Track nullable state across boxing conversions (dotnet#34087) ...
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.
In
receiver[index]we need to update the symbol for the indexer property once we have the flow-analyzed type for the receiver.Fixes #29964