diff options
author | Michal Strehovský <michals@microsoft.com> | 2016-04-27 22:59:25 +0300 |
---|---|---|
committer | Michal Strehovský <michals@microsoft.com> | 2016-04-27 22:59:25 +0300 |
commit | b9bca135cc795e045de69d6eb1f7828e09d71d44 (patch) | |
tree | 3be883d9f4b26994cc8871dbd880666d260b1b6a /src/ILCompiler.DependencyAnalysisFramework | |
parent | a3a85914fb110d0bf39224a883604329ca650de3 (diff) |
Seal Equals and GetHashCode on DependencyNode
Dependency nodes always use referential equality. Trying to provide
other semantics would break the dependency analysis engine, so let's
forbid that.
Diffstat (limited to 'src/ILCompiler.DependencyAnalysisFramework')
-rw-r--r-- | src/ILCompiler.DependencyAnalysisFramework/src/DependencyNode.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ILCompiler.DependencyAnalysisFramework/src/DependencyNode.cs b/src/ILCompiler.DependencyAnalysisFramework/src/DependencyNode.cs index 6babb4de5..47ee408d5 100644 --- a/src/ILCompiler.DependencyAnalysisFramework/src/DependencyNode.cs +++ b/src/ILCompiler.DependencyAnalysisFramework/src/DependencyNode.cs @@ -46,5 +46,15 @@ namespace ILCompiler.DependencyAnalysisFramework { return GetName(); } + + public sealed override bool Equals(object obj) + { + return Object.ReferenceEquals(this, obj); + } + + public sealed override int GetHashCode() + { + return base.GetHashCode(); + } } } |