When I call a method expecting a byte[] with an sbyte[], the verifier
doesn't mind. Is this by design or is it a bug?

.assembly extern mscorlib {}
.assembly test {}
.module test.exe
.imagebase 0x00400000
.subsystem 0x00000003
.file alignment 512
.corflags 0x00000001

.class private auto ansi beforefieldinit Test
       extends [mscorlib]System.Object
{
  .method public hidebysig static void  Main() cil managed
  {
    .entrypoint
    .maxstack  1
    ldc.i4.1
    newarr     [mscorlib]System.SByte
    call       void Test::Func(unsigned int8[])
    ret
  }

  .method public hidebysig static void  Func(unsigned int8[] b) cil
managed
  {
    .maxstack  0
    ret
  }

  .method public hidebysig specialname rtspecialname
          instance void  .ctor() cil managed
  {
    .maxstack  1
    ldarg.0
    call       instance void [mscorlib]System.Object::.ctor()
    ret
  }
}

Regards,
Jeroen

Reply via email to