Introduce kotlin.AutoCloseable typealias in K/JVM stdlib #KT-55777
This commit is contained in:
committed by
Space Team
parent
98ad68eb90
commit
557ea32f87
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
package
|
||||
|
||||
public fun foo(): kotlin.Int?
|
||||
public inline fun </*0*/ T : java.lang.AutoCloseable, /*1*/ R> T.use(/*0*/ block: (T) -> R): R
|
||||
public inline fun </*0*/ T : kotlin.AutoCloseable /* = java.lang.AutoCloseable */, /*1*/ R> T.use(/*0*/ block: (T) -> R): R
|
||||
|
||||
@@ -150,6 +150,7 @@ kotlin {
|
||||
freeCompilerArgs.set(
|
||||
listOfNotNull(
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xexpect-actual-classes",
|
||||
"-Xmultifile-parts-inherit",
|
||||
"-Xno-new-java-annotation-targets",
|
||||
"-Xexplicit-api=strict",
|
||||
|
||||
@@ -12,12 +12,9 @@ package kotlin
|
||||
import kotlin.contracts.InvocationKind
|
||||
import kotlin.contracts.contract
|
||||
|
||||
// TODO: Introduce this typealias when Common AutoCloseable is stabilized.
|
||||
// This typealias shadows existing java.lang.AutoCloseable, and the experimental status would require
|
||||
// opt-in in exiting usages (that are w/o package prefix). Hence it would break previously compilable code.
|
||||
//@Suppress("ACTUAL_WITHOUT_EXPECT")
|
||||
//@SinceKotlin("1.8")
|
||||
//public actual typealias AutoCloseable = java.lang.AutoCloseable
|
||||
@Suppress("ACTUAL_WITHOUT_EXPECT")
|
||||
@SinceKotlin("2.0")
|
||||
public actual typealias AutoCloseable = java.lang.AutoCloseable
|
||||
|
||||
@Suppress("ACTUAL_WITHOUT_EXPECT")
|
||||
@SinceKotlin("1.2")
|
||||
|
||||
Reference in New Issue
Block a user