Change deprecations annotation order on Ranges#endExclusive property
We have [Int|Long|Char]Range classes in 2 different places: - as separate class-files - serialized in the kotlin_builtins file For some reason our Kotlin compiler during the JVM compilation re-arranging the order of the annotations, so in class file they will be written in the following order: - Deprecated - SinceKotlin - ExperimentalStdlibApi But in the kotlin_builtins they will be stored the same way as in the sources. We need these 2 way to be synchronized, because stub's in IDE cares about order. After this commit IDE test BuiltInDecompilerConsistencyTest is fixed
This commit is contained in:
committed by
teamcity
parent
509ed69d28
commit
d788a927c4
@@ -15,9 +15,9 @@ public class CharRange(start: Char, endInclusive: Char) : CharProgression(start,
|
||||
override val start: Char get() = first
|
||||
override val endInclusive: Char get() = last
|
||||
|
||||
@Deprecated("Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.")
|
||||
@SinceKotlin("1.7")
|
||||
@ExperimentalStdlibApi
|
||||
@Deprecated("Can throw an exception when it's impossible to represent the value with Char type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.")
|
||||
override val endExclusive: Char get() {
|
||||
if (last == Char.MAX_VALUE) error("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.")
|
||||
return last + 1
|
||||
@@ -55,9 +55,9 @@ public class IntRange(start: Int, endInclusive: Int) : IntProgression(start, end
|
||||
override val start: Int get() = first
|
||||
override val endInclusive: Int get() = last
|
||||
|
||||
@Deprecated("Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.")
|
||||
@SinceKotlin("1.7")
|
||||
@ExperimentalStdlibApi
|
||||
@Deprecated("Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.")
|
||||
override val endExclusive: Int get() {
|
||||
if (last == Int.MAX_VALUE) error("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.")
|
||||
return last + 1
|
||||
@@ -95,9 +95,9 @@ public class LongRange(start: Long, endInclusive: Long) : LongProgression(start,
|
||||
override val start: Long get() = first
|
||||
override val endInclusive: Long get() = last
|
||||
|
||||
@Deprecated("Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.")
|
||||
@SinceKotlin("1.7")
|
||||
@ExperimentalStdlibApi
|
||||
@Deprecated("Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw.")
|
||||
override val endExclusive: Long get() {
|
||||
if (last == Long.MAX_VALUE) error("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.")
|
||||
return last + 1
|
||||
|
||||
Reference in New Issue
Block a user