Skip to content

Commit ca68360

Browse files
committed
Fixes #35
1 parent b2d5968 commit ca68360

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/dotnet-ildasm/Infrastructure/MethodDefinitionExtensions.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static void WriteILBody(this MethodDefinition method, IOutputWriter outpu
2020
if (method.MethodReturnType.HasCustomAttributes)
2121
{
2222
outputWriter.WriteLine(".param [0]");
23-
foreach(var attr in method.MethodReturnType.CustomAttributes)
23+
foreach (var attr in method.MethodReturnType.CustomAttributes)
2424
attr.WriteIL(outputWriter);
2525
}
2626

@@ -105,6 +105,9 @@ private static void WriteLocalVariablesIfNeeded(MethodDefinition method, IOutput
105105
if (i > 0)
106106
variables += ", ";
107107

108+
if (variable.VariableType.MetadataType == MetadataType.Class || variable.VariableType.IsGenericInstance)
109+
variables += "class ";
110+
108111
variables += $"{variable.VariableType.ToIL()} V_{i++}";
109112
}
110113

0 commit comments

Comments
 (0)