Report error on calls to obsolete inline suspend functions

They do not contain markers for suspend calls in them

See the changes introduced for fixing KT-16603
This commit is contained in:
Denis Zharkov
2017-06-15 14:56:17 +03:00
parent 6441c9d913
commit cb95986c36
12 changed files with 115 additions and 29 deletions
@@ -46,6 +46,16 @@ abstract class BinaryVersion(vararg val numbers: Int) {
else major == ourVersion.major && minor <= ourVersion.minor
}
fun isAtLeast(major: Int, minor: Int, patch: Int): Boolean {
if (this.major > major) return true
if (this.major < major) return false
if (this.minor > minor) return true
if (this.minor < minor) return false
return this.patch >= patch
}
override fun toString(): String {
val versions = toArray().takeWhile { it != UNKNOWN }
return if (versions.isEmpty()) "unknown" else versions.joinToString(".")