Skip to content

Commit

Permalink
dont use ModuleDefinition.TypeSystem.Object
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Jun 23, 2018
1 parent 82b1fc4 commit 8b1709c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<LangVersion>latest</LangVersion>
<Version>1.6.1</Version>
<Version>1.6.2</Version>
</PropertyGroup>
</Project>
3 changes: 2 additions & 1 deletion Janitor.Fody/ReferenceFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ public partial class ModuleWeaver
{
public void FindCoreReferences()
{
ObjectFinalizeReference = ModuleDefinition.ImportReference(ModuleDefinition.TypeSystem.Object.Resolve().Find("Finalize"));
var objectTypeDefinition = FindType("System.Object");
ObjectFinalizeReference = ModuleDefinition.ImportReference(objectTypeDefinition.Find("Finalize"));

var gcTypeDefinition = FindType("System.GC");
SuppressFinalizeMethodReference = ModuleDefinition.ImportReference(gcTypeDefinition.Find("SuppressFinalize", "Object"));
Expand Down

0 comments on commit 8b1709c

Please sign in to comment.