Browse Source

#1806: Use NormalizeTypeVisitor.TypeErasure.EquivalentTypes in DebugInfoGenerator.HandleMethodBody to fix false positives in assertion.

pull/3050/head
Siegfried Pammer 2 years ago
parent
commit
4893c58ac0
  1. 2
      ICSharpCode.Decompiler/DebugInfo/DebugInfoGenerator.cs

2
ICSharpCode.Decompiler/DebugInfo/DebugInfoGenerator.cs

@ -256,7 +256,7 @@ namespace ICSharpCode.Decompiler.DebugInfo @@ -256,7 +256,7 @@ namespace ICSharpCode.Decompiler.DebugInfo
if (v.Index != null && v.Kind.IsLocal())
{
#if DEBUG
Debug.Assert(v.Index < types.Length && v.Type.Equals(types[v.Index.Value]));
Debug.Assert(v.Index < types.Length && NormalizeTypeVisitor.TypeErasure.EquivalentTypes(v.Type, types[v.Index.Value]));
#endif
localVariables.Add(v);
}

Loading…
Cancel
Save