Deprecated ranges: relax errors to warnings.

This commit is contained in:
Ilya Gorbunov
2015-10-18 02:20:53 +03:00
parent 69dc6701cc
commit 078d904d41
9 changed files with 56 additions and 56 deletions
@@ -80,7 +80,7 @@ fun comparables(): List<GenericFunction> {
@return this value if it's in the [range], or range.start if this value is less than range.start, or range.end if this value is greater than range.end.
"""
}
deprecate(Deprecation("This range implementation has unclear semantics and will be removed soon.", level = DeprecationLevel.ERROR))
deprecate(Deprecation("This range implementation has unclear semantics and will be removed soon.", level = DeprecationLevel.WARNING))
body {
"""
if (range.isEmpty()) throw IllegalArgumentException("Cannot coerce value to an empty range: ${'$'}range.")
@@ -26,7 +26,7 @@ fun ranges(): List<GenericFunction> {
doc(ProgressionsOfPrimitives) { "Returns a progression that goes over the same range in the opposite direction with the same step." }
doc(RangesOfPrimitives) { "Returns a progression that goes over this range in reverse direction." }
returns("TProgression")
deprecate(Deprecation("This range implementation has unclear semantics and will be removed soon.", level = DeprecationLevel.ERROR))
deprecate(Deprecation("This range implementation has unclear semantics and will be removed soon.", level = DeprecationLevel.WARNING))
annotations("""@Suppress("DEPRECATION_ERROR")""")
body(RangesOfPrimitives) {
"return TProgression(end, start, -ONE)"
@@ -66,7 +66,7 @@ fun ranges(): List<GenericFunction> {
doc(ProgressionsOfPrimitives) { "Returns a progression that goes over the same range with the given step." }
doc(RangesOfPrimitives) { "Returns a progression that goes over this range with given step." }
returns("TProgression")
deprecate(Deprecation("This range implementation has unclear semantics and will be removed soon.", level = DeprecationLevel.ERROR))
deprecate(Deprecation("This range implementation has unclear semantics and will be removed soon.", level = DeprecationLevel.WARNING))
annotations("""@Suppress("DEPRECATION_ERROR")""")
body(RangesOfPrimitives) {
"""
@@ -107,7 +107,7 @@ fun ranges(): List<GenericFunction> {
}
if (!fromType.isIntegral() || !toType.isIntegral()) {
deprecate(Deprecation("This range implementation has unclear semantics and will be removed soon.", level = DeprecationLevel.ERROR))
deprecate(Deprecation("This range implementation has unclear semantics and will be removed soon.", level = DeprecationLevel.WARNING))
annotations("""@Suppress("DEPRECATION_ERROR")""")
}
@@ -147,7 +147,7 @@ fun ranges(): List<GenericFunction> {
}
if (!fromType.isIntegral() || !toType.isIntegral()) {
deprecate(Deprecation("This range implementation has unclear semantics and will be removed soon.", level = DeprecationLevel.ERROR))
deprecate(Deprecation("This range implementation has unclear semantics and will be removed soon.", level = DeprecationLevel.WARNING))
annotations("""@Suppress("DEPRECATION_ERROR")""")
}
@@ -180,7 +180,7 @@ fun ranges(): List<GenericFunction> {
operator(true)
if (!rangeType.isIntegral()) {
deprecate(Deprecation("This range implementation has unclear semantics and will be removed soon.", level = DeprecationLevel.ERROR))
deprecate(Deprecation("This range implementation has unclear semantics and will be removed soon.", level = DeprecationLevel.WARNING))
annotations("""@Suppress("DEPRECATION_ERROR")""")
}