|
|
|
@ -1473,15 +1473,7 @@ namespace ICSharpCode.Decompiler.CSharp
@@ -1473,15 +1473,7 @@ namespace ICSharpCode.Decompiler.CSharp
|
|
|
|
|
|
|
|
|
|
if (entityDecl != null) |
|
|
|
|
{ |
|
|
|
|
int i = 0; |
|
|
|
|
var parameters = function.Variables.Where(v => v.Kind == VariableKind.Parameter).ToDictionary(v => v.Index); |
|
|
|
|
foreach (var parameter in entityDecl.GetChildrenByRole(Roles.Parameter)) |
|
|
|
|
{ |
|
|
|
|
if (parameters.TryGetValue(i, out var v)) |
|
|
|
|
parameter.AddAnnotation(new ILVariableResolveResult(v, method.Parameters[i].Type)); |
|
|
|
|
i++; |
|
|
|
|
} |
|
|
|
|
entityDecl.AddAnnotation(function); |
|
|
|
|
AddAnnotationsToDeclaration(method, entityDecl, function); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var localSettings = settings.Clone(); |
|
|
|
@ -1541,6 +1533,19 @@ namespace ICSharpCode.Decompiler.CSharp
@@ -1541,6 +1533,19 @@ namespace ICSharpCode.Decompiler.CSharp
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
internal static void AddAnnotationsToDeclaration(IMethod method, EntityDeclaration entityDecl, ILFunction function) |
|
|
|
|
{ |
|
|
|
|
int i = 0; |
|
|
|
|
var parameters = function.Variables.Where(v => v.Kind == VariableKind.Parameter).ToDictionary(v => v.Index); |
|
|
|
|
foreach (var parameter in entityDecl.GetChildrenByRole(Roles.Parameter)) |
|
|
|
|
{ |
|
|
|
|
if (parameters.TryGetValue(i, out var v)) |
|
|
|
|
parameter.AddAnnotation(new ILVariableResolveResult(v, method.Parameters[i].Type)); |
|
|
|
|
i++; |
|
|
|
|
} |
|
|
|
|
entityDecl.AddAnnotation(function); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
internal static void CleanUpMethodDeclaration(EntityDeclaration entityDecl, BlockStatement body, ILFunction function, bool decompileBody = true) |
|
|
|
|
{ |
|
|
|
|
if (function.IsIterator) |
|
|
|
|