From 09072f6cdcd796abc3dc480bff4b7ba16d58fad6 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Fri, 7 Oct 2016 04:53:57 +0300 Subject: [PATCH] Remove toInt() conversion as it's hardly required. #KT-14789 --- libraries/stdlib/src/kotlin/util/KotlinVersion.kt | 10 ---------- .../reference-public-api/kotlin-stdlib.txt | 1 - 2 files changed, 11 deletions(-) diff --git a/libraries/stdlib/src/kotlin/util/KotlinVersion.kt b/libraries/stdlib/src/kotlin/util/KotlinVersion.kt index 7a3944f9eb5..fc87b28661a 100644 --- a/libraries/stdlib/src/kotlin/util/KotlinVersion.kt +++ b/libraries/stdlib/src/kotlin/util/KotlinVersion.kt @@ -24,16 +24,6 @@ public class KotlinVersion(val major: Int, val minor: Int, val patch: Int) : Com return major shl 16 + minor shl 8 + patch } - /** - * Returns the integer representation of this version. - * - * Integer representations of two [KotlinVersion] instances can be compared, - * so that if `v1.toInt() > v2.toInt()` then `v1 > v2`. - * - * This value should not be persisted, as it can change between program runs. - */ - public fun toInt(): Int = version - /** * Returns the string representation of this version */ diff --git a/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib.txt b/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib.txt index 460e1c27459..16827021646 100644 --- a/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib.txt +++ b/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib.txt @@ -17,7 +17,6 @@ public final class kotlin/KotlinVersion : java/lang/Comparable { public fun hashCode ()I public final fun isAtLeast (II)Z public final fun isAtLeast (III)Z - public final fun toInt ()I public fun toString ()Ljava/lang/String; }