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
|
package
|
||||||
|
|
||||||
public fun foo(): kotlin.Int?
|
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(
|
freeCompilerArgs.set(
|
||||||
listOfNotNull(
|
listOfNotNull(
|
||||||
"-Xallow-kotlin-package",
|
"-Xallow-kotlin-package",
|
||||||
|
"-Xexpect-actual-classes",
|
||||||
"-Xmultifile-parts-inherit",
|
"-Xmultifile-parts-inherit",
|
||||||
"-Xno-new-java-annotation-targets",
|
"-Xno-new-java-annotation-targets",
|
||||||
"-Xexplicit-api=strict",
|
"-Xexplicit-api=strict",
|
||||||
|
|||||||
@@ -12,12 +12,9 @@ package kotlin
|
|||||||
import kotlin.contracts.InvocationKind
|
import kotlin.contracts.InvocationKind
|
||||||
import kotlin.contracts.contract
|
import kotlin.contracts.contract
|
||||||
|
|
||||||
// TODO: Introduce this typealias when Common AutoCloseable is stabilized.
|
@Suppress("ACTUAL_WITHOUT_EXPECT")
|
||||||
// This typealias shadows existing java.lang.AutoCloseable, and the experimental status would require
|
@SinceKotlin("2.0")
|
||||||
// opt-in in exiting usages (that are w/o package prefix). Hence it would break previously compilable code.
|
public actual typealias AutoCloseable = java.lang.AutoCloseable
|
||||||
//@Suppress("ACTUAL_WITHOUT_EXPECT")
|
|
||||||
//@SinceKotlin("1.8")
|
|
||||||
//public actual typealias AutoCloseable = java.lang.AutoCloseable
|
|
||||||
|
|
||||||
@Suppress("ACTUAL_WITHOUT_EXPECT")
|
@Suppress("ACTUAL_WITHOUT_EXPECT")
|
||||||
@SinceKotlin("1.2")
|
@SinceKotlin("1.2")
|
||||||
|
|||||||
Reference in New Issue
Block a user