ILSpy
ILSpy copied to clipboard
pdbgen, unhandled case (unsafe, pinned var)
DebugInfoGenerator.HandleMethodBody assert failure.
function
is a getter. function.Variables
= 2.
In the assert, v.Type
= System.Byte*
. types[v.Index.Value]
is System.Byte& pinned
.
The decompiler itself handles this case, suggesting the fix could be straightforward.
@dgrunwald Do you think we should relax the assertion in this case? Would type normalization help in this case?
I have encountered a similar problem involving nullable annotated local variables. (string?).Equals(string)
returns false, resulting in an assertion failure. My solution to this problem would be to apply type erasure, i.e., erase all type information that will never appear in local variable signatures.