diff --git a/ICSharpCode.Decompiler/TypeSystem/TypeUtils.cs b/ICSharpCode.Decompiler/TypeSystem/TypeUtils.cs index 0717f38e2..2fc75cc04 100644 --- a/ICSharpCode.Decompiler/TypeSystem/TypeUtils.cs +++ b/ICSharpCode.Decompiler/TypeSystem/TypeUtils.cs @@ -196,6 +196,8 @@ namespace ICSharpCode.Decompiler.TypeSystem memoryType = ((TypeWithElementType)pointerType).ElementType; else return false; + memoryType = memoryType.AcceptVisitor(NormalizeTypeVisitor.TypeErasure); + accessType = accessType.AcceptVisitor(NormalizeTypeVisitor.TypeErasure); if (memoryType.Equals(accessType)) return true; // If the types are not equal, the access still might produce equal results in some cases: