Cleanup obsolete RequireKotlin annotations
They were used to prevent older compiler versions from using specific API, but now these versions are even older than the first compiler version (namely 1.6) that can read this stdlib.
This commit is contained in:
@@ -18,7 +18,6 @@ import kotlin.internal.*
|
||||
* @return the result of [block] function invoked on this resource.
|
||||
*/
|
||||
@InlineOnly
|
||||
@RequireKotlin("1.2", versionKind = RequireKotlinVersionKind.COMPILER_VERSION, message = "Requires newer compiler version to be inlined correctly.")
|
||||
public inline fun <T : Closeable?, R> T.use(block: (T) -> R): R {
|
||||
contract {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
|
||||
@@ -227,6 +227,5 @@ public fun File.readLines(charset: Charset = Charsets.UTF_8): List<String> {
|
||||
* @param charset character set to use. By default uses UTF-8 charset.
|
||||
* @return the value returned by [block].
|
||||
*/
|
||||
@RequireKotlin("1.2", versionKind = RequireKotlinVersionKind.COMPILER_VERSION, message = "Requires newer compiler version to be inlined correctly.")
|
||||
public inline fun <T> File.useLines(charset: Charset = Charsets.UTF_8, block: (Sequence<String>) -> T): T =
|
||||
bufferedReader(charset).use { block(it.lineSequence()) }
|
||||
|
||||
@@ -48,7 +48,6 @@ public fun Reader.readLines(): List<String> {
|
||||
* the processing is complete.
|
||||
* @return the value returned by [block].
|
||||
*/
|
||||
@RequireKotlin("1.2", versionKind = RequireKotlinVersionKind.COMPILER_VERSION, message = "Requires newer compiler version to be inlined correctly.")
|
||||
public inline fun <T> Reader.useLines(block: (Sequence<String>) -> T): T =
|
||||
buffered().use { block(it.lineSequence()) }
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ import kotlin.internal.RequireKotlinVersionKind
|
||||
* @[JvmDefault] methods are excluded from interface delegation.
|
||||
*/
|
||||
@SinceKotlin("1.2")
|
||||
@RequireKotlin("1.2.40", versionKind = RequireKotlinVersionKind.COMPILER_VERSION)
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
|
||||
@Deprecated("Switch to new -Xjvm-default modes: `all` or `all-compatibility`")
|
||||
annotation class JvmDefault
|
||||
@@ -45,7 +44,6 @@ annotation class JvmDefault
|
||||
* Used only with `-Xjvm-default=compatibility|all-compatibility`.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
@RequireKotlin("1.4", versionKind = RequireKotlinVersionKind.COMPILER_VERSION)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
annotation class JvmDefaultWithoutCompatibility
|
||||
|
||||
|
||||
Reference in New Issue
Block a user