Conversation
There was a problem hiding this comment.
This is what is forcing all the ImmutableArray<Location?> annotation changes. #ByDesign
|
@dotnet/roslyn-compiler for a second review. |
There was a problem hiding this comment.
elementLocations [](start = 34, length = 16)
elementLocations [](start = 34, length = 16)
Should the type of elementLocations be adjusted in public API then, so we avoid the suppression? #Closed
There was a problem hiding this comment.
I don't think so. If you're creating this from a public context, you should pass real locations as more of a matter of principle.
In reply to: 367179639 [](ancestors = 367179639)
There was a problem hiding this comment.
Just to clarify: When do we need to pass null locations internal?
Maybe we can mark as non-nullable across the board...
In reply to: 370338279 [](ancestors = 370338279,367179639)
There was a problem hiding this comment.
ImmutableArray<Location?> elementLocations [](start = 12, length = 42)
what prompted that change?
Do we need a test for Compilation.CreateTupleTypeSymbol passing null locations? (I couldn't find one) #Closed
There was a problem hiding this comment.
boundNamedArgumentsBuilder == null [](start = 28, length = 34)
consider changing this test to check boundNamedArgumentsSet instead, since the two locals are always initialized together (or not), then the suppression can be removed. #WontFix
There was a problem hiding this comment.
Our approach for nullable has been to not change any semantic behavior, just to annotate what we are currently doing. I'm going to keep this going forward.
In reply to: 367181664 [](ancestors = 367181664)
There was a problem hiding this comment.
namedArgument.NameEquals [](start = 46, length = 24)
consider using an assertion instead #Closed
There was a problem hiding this comment.
NameEquals [](start = 47, length = 10)
consider using an assertion here too (and at least one more place below) #Closed
There was a problem hiding this comment.
name [](start = 38, length = 4)
consider asserting instead #Closed
There was a problem hiding this comment.
results [](start = 53, length = 7)
why this suppression? #Closed
There was a problem hiding this comment.
RemoveInvalidConstraints takes a non-null arraybuilder. We started with some nulls in the array, but just went through the whole thing to remove it.
In reply to: 367182789 [](ancestors = 367182789)
There was a problem hiding this comment.
Type [](start = 38, length = 4)
how do we know source.Type isn't null from surrounding code?
If we know because of some remote code, then assertion seems preferable.
Note: a few lines below we do a null-test on source.Type #Closed
There was a problem hiding this comment.
Note: a few lines below we do a null-test on source.Type
BindToNaturalType should take care of that, but I'll add an assert.
In reply to: 367183378 [](ancestors = 367183378)
There was a problem hiding this comment.
ContainingType [](start = 43, length = 14)
Is the suppression okay because InFieldInitializer is true at this point? #Closed
There was a problem hiding this comment.
There was a problem hiding this comment.
destination [](start = 24, length = 11)
Should destination be declared as nullable? #Closed
There was a problem hiding this comment.
There was a problem hiding this comment.
destination [](start = 103, length = 11)
Can't destination be null here? Seems dangerous #WontFix
There was a problem hiding this comment.
There was a problem hiding this comment.
Sorry, I'd missed your reply. Consider removing the superfluous null check so that we don't need those suppressions.
Suppressions are typically for when the compiler is not able to analyze properly, but here it's rather that the code is inconsistent (checks for null in one place, but would blow up with null in another).
In reply to: 370290111 [](ancestors = 370290111,367184489)
There was a problem hiding this comment.
I'm not going to change the semantics of the code in this PR.
In reply to: 375590101 [](ancestors = 375590101,370290111,367184489)
Should this be nullable? we test for null below #Closed Refers to: src/Compilers/CSharp/Portable/Binder/Binder_Attributes.cs:1043 in 69941f7. [](commit_id = 69941f757708eed5a20e8620b40e4a70e3ceaf0d, deletion_comment = False) |
jcouv
left a comment
There was a problem hiding this comment.
Done with review pass (iteration 3)
|
Done with review pass (iteration 3) In reply to: 343620361 [](ancestors = 343620361) |
jcouv
left a comment
There was a problem hiding this comment.
Done with review pass (iteration 4). Still a question on CreateTuple API. Thanks
7b46652 to
55833bb
Compare
jcouv
left a comment
There was a problem hiding this comment.
Done with review pass (iteration 5)
|
Verified this still builds locally. |
No description provided.