We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2b47b4 commit f4682fdCopy full SHA for f4682fd
ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs
@@ -226,14 +226,11 @@ static string GetNameFromInstruction(ILInstruction inst)
226
{
227
switch (inst) {
228
case LdObj ldobj:
229
- IField field;
230
- if (ldobj.Target is LdFlda ldflda)
231
- field = ldflda.Field;
232
- else if (ldobj.Target is LdsFlda ldsflda)
233
- field = ldsflda.Field;
234
- else
235
- break;
236
- return CleanUpVariableName(field.Name);
+ return GetNameFromInstruction(ldobj.Target);
+ case LdFlda ldflda:
+ return CleanUpVariableName(ldflda.Field.Name);
+ case LdsFlda ldsflda:
+ return CleanUpVariableName(ldsflda.Field.Name);
237
case CallInstruction call:
238
if (call is NewObj) break;
239
IMethod m = call.Method;
0 commit comments