0xd4d / dnlib

Reads and writes .NET assemblies and modules
MIT License
2.18k stars 587 forks source link

Make `Instruction.GetArgumentType` consistent with `ParameterList` #521

Closed ElektroKill closed 1 year ago

ElektroKill commented 1 year ago

ParameterList created a GenericInstSig if declaring type is generic, while Instruction.GetArgumentType did not.

https://github.com/0xd4d/dnlib/blob/8558fa74e2382fe8acfecbbb04e3a48e07e01953/src/DotNet/ParameterList.cs#L122-L138

https://github.com/0xd4d/dnlib/blob/8558fa74e2382fe8acfecbbb04e3a48e07e01953/src/DotNet/Emit/Instruction.cs#L747-L748

if declaringType is TypeSpec we trust the user to provide the proper instantiated type!