Track nullable state across boxing conversions#34087
Conversation
|
@dotnet/roslyn-compiler please review. |
There was a problem hiding this comment.
Boxing [](start = 48, length = 6)
from our discussion, it would be good to leave a comment saying why we don't need to create new slots for boxing/unboxing (ie. assignment will do that anyways).
Also, the scenario you wrote on the whiteboard ((S)(object)new S() { F = null }) is a good illustration of current behavior, if that's not already tested. #Resolved
There was a problem hiding this comment.
targetType.TypeKind == TypeKind.TypeParameter [](start = 56, length = 45)
I found this change surprising. Why isn't targetType.IsReferenceType sufficient? #ByDesign
There was a problem hiding this comment.
Unconstrained type parameters, and type parameters constrained to value types, were not handled here nor in the else previously.
In reply to: 265721470 [](ancestors = 265721470)
There was a problem hiding this comment.
NewT [](start = 35, length = 4)
Should this depend on the T (constrained or not, ...)? #ByDesign
There was a problem hiding this comment.
There was a problem hiding this comment.
Nulalble [](start = 81, length = 8)
nit: typo #Resolved
There was a problem hiding this comment.
Nulalble [](start = 81, length = 8)
same (typo) #Resolved
* 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) ...
Fixes #33387
See also #32599