Produce correct diagnostics on implicit operator conversions for stackalloc expressions#26248
Produce correct diagnostics on implicit operator conversions for stackalloc expressions#26248OmarTawfik merged 2 commits intodotnet:masterfrom OmarTawfik:fix-26195-stackalloc-conversion-crash
Conversation
|
@jaredpar for approval. #Closed |
There was a problem hiding this comment.
Test2 [](start = 33, length = 5)
Do we have tests for scenarios when this is "Test" instead of "Test2"? #Closed
There was a problem hiding this comment.
Yes. Please check the tests at the start of this file for semantic model, and tests at the end of CodeGenTests.cs for emitting the conversion.
In reply to: 183469924 [](ancestors = 183469924)
There was a problem hiding this comment.
Test2 [](start = 33, length = 5)
Do we have tests for scenarios when this is "Test" instead of "Test2"? #Closed
There was a problem hiding this comment.
ConversionKind.StackAllocToPointerType [](start = 21, length = 38)
ConversionKind.StackAllocToPointerType [](start = 21, length = 38)
It is not obvious why is this correct fix. Some explanation and perhaps a quote from relevant portion of language specification might help. #Closed
There was a problem hiding this comment.
There is no language spec as this is a C# 7.2 feature.
This is the up to date document: https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.2/span-safety.md
About why is that the correct fix, I'll add a comment to explain.
In reply to: 183471406 [](ancestors = 183471406)
|
Done with review pass (iteration 1) #Closed |
|
@AlekseyTs comments addressed. |
|
@jcouv for ask mode approval. #Closed |
|
Approved. Thanks |
* dotnet/master: (732 commits) Disable procdump on Spanish runs use named args. Exclude System.Diagnostics.DiagnosticSource from PortableFacades Exclude System.Net.Http from PortableFacades Align the implementations of IAssemblySymbol.GivesAccessTo (#26727) Fixed exception message in GetSemanticModel (#26659) Implement IDiscardSymbol.Equals and GetHashCode (#26720) Produce correct diagnostics on implicit operator conversions for stackalloc expressions (#26248) Remove special case handling of CreateDiagnosticProviderAndFixer throwing an exception Add verbose logging to DevDivInsertionFiles if you want it Exclude Microsoft.Composition as something we build a dependency map for Fix the message for Make Field Readonly Update LangVersion to 7.3 (#26698) fix extension deployment and add explainatory comment Add TaskExtensions to compiler package Add System.Diagnostics.DiagnosticSource to SignToolData.json Include missing facade: System.Diagnostics.DiagnosticSource Use default expressions. Remove forwarding method. Revert project chnage. ...
Fixes #26195
cc @dotnet/roslyn-compiler for reivew.