diff --git a/source/dub/dependency.d b/source/dub/dependency.d index e250b0c..a47e551 100644 --- a/source/dub/dependency.d +++ b/source/dub/dependency.d @@ -374,8 +374,9 @@ using `Dependency` as a key in hash or tree maps. */ bool opEquals(in Dependency o) const scope @safe { - return this.m_value == o.m_value - && o.m_optional == m_optional && o.m_default == m_default; + if (o.m_optional != this.m_optional) return false; + if (o.m_default != this.m_default) return false; + return this.m_value == o.m_value; } /// ditto