Introduce BinaryVersion.isCompatible()

To decrease the chance to mix up the receiver and the first argument when
checking version compatibility
This commit is contained in:
Alexander Udalov
2015-12-28 16:39:17 +03:00
parent 04d335db15
commit 9552accaec
17 changed files with 31 additions and 56 deletions
@@ -29,6 +29,8 @@ class KotlinJavascriptMetadata(val abiVersion: Int, val moduleName: String, val
class JsBinaryVersion protected constructor(
major: Int, minor: Int, patch: Int, rest: List<Int>
) : BinaryVersion(major, minor, patch, rest) {
override fun isCompatible() = this.isCompatibleTo(INSTANCE)
companion object {
@JvmField val INSTANCE = create(0, 3, 0)