diff --git a/ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs b/ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs index eea8dedae..1cbf92cee 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs @@ -196,7 +196,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms proposedName = proposedNameForLoads[0]; } } - if (string.IsNullOrEmpty(proposedName)) { + if (string.IsNullOrEmpty(proposedName) && variable.Kind == VariableKind.StackSlot) { var proposedNameForStoresFromNewObj = variable.StoreInstructions.OfType() .Select(expr => GetNameByType(GuessType(variable.Type, expr.Value, context))) .Except(currentFieldNames).ToList();