diff --git a/source/dub/dependency.d b/source/dub/dependency.d index 315ff52..63140ee 100644 --- a/source/dub/dependency.d +++ b/source/dub/dependency.d @@ -875,7 +875,8 @@ return 0; } - public bool matches (ref const Version v) const @safe + public bool matches (ref const Version v, VersionMatchMode mode = VersionMatchMode.standard) + const @safe { if (m_versA.isBranch) { enforce(this.isExactVersion()); @@ -885,6 +886,9 @@ if (v.isBranch) return m_versA == v; + if (m_versA == m_versB) + return this.m_versA.matches(v, mode); + return doCmp(m_inclusiveA, m_versA, v) && doCmp(m_inclusiveB, v, m_versB); }