Skip to content

Commit

Permalink
fix: False positive when comparing two DependencyOverride
Browse files Browse the repository at this point in the history
Fixed #157
  • Loading branch information
ENikS committed Jun 3, 2020
1 parent a085539 commit 4db9f26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Dependency/Resolution/Overrides/DependencyOverride.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ public override bool Equals(object other)
switch (other)
{
case DependencyOverride dependency:
return (dependency.Type == Type) &&
(dependency.Name == Name);
return (null == Target || dependency.Target == Target) &&
(null == Type || dependency.Type == Type ) &&
(null == Name || dependency.Name == Name);

case NamedType type:
return Equals(type);
Expand Down

0 comments on commit 4db9f26

Please sign in to comment.