Lokad/ILPack

Incorrect method parameter numbering

Twinside opened this issue · 1 comments

I've dumped twice the same generated program in two assemblies, one in net462, the other one with Lokad.ILPack. The problem can be seen by inspecting the jot_2 class in both dumped assemblies.

With the one generated through net462 we have the following decompiled line (from dotpeek):

task1 = page3 = pageRest11.GetPage(obj1, num5 = (int) num3, obj5);

While Lokad.ILPack generates the following.

task1 = page3 = pageRest11.GetPage(_param2, num5 = (int) num3, (CancellationToken) _param5);

_param5 being the last argument of the run method. Attached the copy of the two generated assembly.

jot_dump.zip

@Twinside Thank you for detailed report. It was a big help. It turns out ILPack doesn't take into account this as extra parameter during position encoding for instance methods. #86 should fix this problem.