This is another weird error:

B2P.DMV.CoreClasses.DMVOrder::.ctor][mdToken=0x6000266][of
fset 0x0000000D][found ref ('this' ptr) 'B2P.DMV.CoreClasses.DMVOrder']
[expected
 ref 'B2P.CoreClasses.Order'] Unexpected type on the stack.

The full ctor code is, below. The second example is the EXACT same
setup (parents class inherited field stored) and here PEVERIFY does
not complain.

.method public specialname rtspecialname
        instance void  .ctor() cil managed
{
  // Code size       28 (0x1c)
  .maxstack  8
  IL_0000:  nop
  IL_0001:  ldarg.0
  IL_0002:  call       instance void
[B2P.CoreClasses]B2P.CoreClasses.Order::.ctor()
  IL_0007:  ldarg.0
  IL_0008:  call       valuetype [mscorlib]System.Guid
[mscorlib]System.Guid::NewGuid()
  IL_000d:  stfld      valuetype [mscorlib]System.Guid
B2P.CoreClasses.Order::OL2S_ObjectID
  IL_0012:  nop
  IL_0013:  ldarg.0
  IL_0014:  call       void
B2P.DMV.CoreClasses.DMVOrder::__ENCAddToList(object)
  IL_0019:  nop
  IL_001a:  nop
  IL_001b:  ret
} // end of method DMVOrder::.ctor

THIS WORKS:

.method public specialname rtspecialname
        instance void  .ctor() cil managed
{
  // Code size       21 (0x15)
  .maxstack  8
  IL_0000:  nop
  IL_0001:  ldarg.0
  IL_0002:  call       instance void
[B2P.CoreClasses]B2P.CoreClasses.ProductDefinition::.ctor()
  IL_0007:  ldarg.0
  IL_0008:  call       valuetype [mscorlib]System.Guid
[mscorlib]System.Guid::NewGuid()
  IL_000d:  stfld      valuetype [mscorlib]System.Guid
B2P.CoreClasses.ProductDefinition::OL2S_ObjectID
  IL_0012:  nop
  IL_0013:  nop
  IL_0014:  ret
} // end of method DonationDefinition::.ctor

-- 
--
mono-cecil

Reply via email to