Is PEVerify warning about duplicate methods wrong here?
<p>I'm working on obfuscating an assembly and after obfuscation PEVerify issues the following error:</p>

<pre><code>[MD]: Error: Method has a duplicate, token=0x060035d8. [token:0x060035D5]
[MD]: Error: Method has a duplicate, token=0x060035d5. [token:0x060035D8]
</code></pre>

<p>Here is the first method declaration with header:</p>

<pre><code>// Token: 0x060035D5 RID: 13781 RVA: 0x000D7828 File Offset: 0x000D5A28
.method private final hidebysig newslot virtual 
    instance void b () cil managed
{
    .override method instance void [mscorlib]System.IDisposable::Dispose()
    // Header Size: 12 bytes
    // Code Size: 52 (0x34) bytes
    // LocalVarSig Token: 0x11000050 RID: 80
    .maxstack 2
    .locals init (
        [0] int32
    )
</code></pre>

<p>And here is the second one:</p>

<pre><code>// Token: 0x060035D8 RID: 13784 RVA: 0x000248BC File Offset: 0x00022ABC
.method private hidebysig 
    instance void b () cil managed
{
    // Header Size: 1 byte
    // Code Size: 31 (0x1F) bytes
    .maxstack 8
</code></pre>

<p>Seems like an explicit IDisposable interface implementation to me. Both methods are called as well, so it is not that all calls to one were replaced with calls to another. They just share the same name</p>

<p>If similar code had been written in C# - compiler would emit methods System.IDisposable.Dispose() and Dispose() thus eliminating same names and making PEVerify silent.</p>

<p>To ensure that same names make valid IL when one of them is explicit override of an interface method and other is not I've written such sample app:</p>

<pre><code>namespace ClassLibrary1 {
    public interface IX { void M(); }
    public class Class1 : IX {
        void IX.M() { Console.WriteLine("IX.M()"); }
        public void M() { Console.WriteLine("M()"); }
    }
    public class Class2 {
        public static void Main(string[] args) {
            var x = new Class1();
            x.M();
            ((IX)x).M();
        }
    }
}
</code></pre>

<p>IL looks like this:</p>

<pre><code>// Token: 0x06000002 RID: 2 RVA: 0x00002050 File Offset: 0x00000250
.method private final hidebysig newslot virtual 
    instance void ClassLibrary1.IX.M () cil managed 
{
    .override method instance void ClassLibrary1.IX::M()
    // Header Size: 1 byte
    // Code Size: 13 (0xD) bytes
    .maxstack 8

    /* 0x00000251 00           */ IL_0000: nop
    /* 0x00000252 7201000070   */ IL_0001: ldstr     "IX.M()"
    /* 0x00000257 280F00000A   */ IL_0006: call      void [mscorlib]System.Console::WriteLine(string)
    /* 0x0000025C 00           */ IL_000B: nop
    /* 0x0000025D 2A           */ IL_000C: ret
} // end of method Class1::ClassLibrary1.IX.M

// Token: 0x06000003 RID: 3 RVA: 0x0000205E File Offset: 0x0000025E
.method public hidebysig 
    instance void M () cil managed 
{
    // Header Size: 1 byte
    // Code Size: 13 (0xD) bytes
    .maxstack 8

    /* 0x0000025F 00           */ IL_0000: nop
    /* 0x00000260 720F000070   */ IL_0001: ldstr     "M()"
    /* 0x00000265 280F00000A   */ IL_0006: call      void [mscorlib]System.Console::WriteLine(string)
    /* 0x0000026A 00           */ IL_000B: nop
    /* 0x0000026B 2A           */ IL_000C: ret
} // end of method Class1::M
</code></pre>

<p>Note different method names.</p>

<p>Then I took resulting exe and edited <code>ClassLibrary1.IX.M</code> to be just <code>M</code> in <code>Class1</code> (I have used <a href="https://github.com/0xd4d/dnSpy" rel="nofollow">dnSpy</a> to do that). PEVerify indeed started issuing the same issue about duplicate methods, but exe is still working just fine printing <code>M() IX.M()</code> as expected.</p>

<p>The question is if PEVerify being overcautious here or there's really an issue with coinciding names I don't see?</p>