You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using System;publicclassC{staticintM()=> F()switch{1=>1,
C { P:int p, Q: C { P:int q }}=> G(()=>p+q),
_ =>0};objectP{get;set;}objectQ{get;set;}staticobjectF()=>null;staticintG(Func<int>f)=>0;}
Produces no debug info for method C.M (specifically, no sequence points).
Analysis:
ILBuilder.AllocateILMarker creates 2 ILMarkers, both at BlockOffset = 0: one user-code sequence point and another hidden one. RealizeSequencePoints uses the last defined sequence point for the offset (the hidden one). SequencePointList.GetSequencePoints then emits no sequence points since the only sequence point in the list is hidden.
The issue is with the hidden sequence point emitted for the switch expression closure.
See PDBTests.SwitchExpression_MethodBody.
The text was updated successfully, but these errors were encountered:
…ion instruction in expression context
Fixesdotnet#37237
Compiler emits incorrect EnC closure data to PDB for nested switch expressions
Fixesdotnet#37232
Expression bodied method whose expression is a switch expression is missing debug info
Fixesdotnet#37261
Produces no debug info for method
C.M
(specifically, no sequence points).Analysis:
ILBuilder.AllocateILMarker
creates 2 ILMarkers, both at BlockOffset = 0: one user-code sequence point and another hidden one.RealizeSequencePoints
uses the last defined sequence point for the offset (the hidden one).SequencePointList.GetSequencePoints
then emits no sequence points since the only sequence point in the list is hidden.The issue is with the hidden sequence point emitted for the switch expression closure.
See
PDBTests.SwitchExpression_MethodBody
.The text was updated successfully, but these errors were encountered: