Capgemini / Cauldron

C# Toolkit
MIT License
76 stars 18 forks source link

IL code is messed up on Attribute copy #19

Closed reflection-emit closed 7 years ago

reflection-emit commented 7 years ago

IL code is messed up if an attribute is copied to the actual code... If the attribute constructor has param arrays.

reflection-emit commented 7 years ago

Weaver created this

    IL_002e: ldc.i4.4
    IL_002f: ldc.i4.0
    IL_0030: newarr [mscorlib]System.Type
    IL_0035: dup
    IL_0036: newobj instance void 

instead of this

    IL_0001: ldc.i4.4
    IL_0002: call !!0[] [mscorlib]System.Array::Empty<class [mscorlib]System.Type>()
    IL_0007: newobj instance void [
reflection-emit commented 7 years ago

fixed in 1.1.0