[KLIB] Deprecate -Xexpect-actual-linker CLI argument
This argument has been finally superseded by `-Xmetadata-klib`. ^KT-61136
This commit is contained in:
committed by
Space Team
parent
620c9434ca
commit
78a962f6d2
-1
@@ -89,7 +89,6 @@ where advanced options include:
|
||||
Enable the checks on uniqueness of signatures
|
||||
-Xexpect-actual-classes 'expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta.
|
||||
Kotlin reports a warning every time you use them. You can use this flag to mute the warning.
|
||||
-Xexpect-actual-linker Enable experimental expect/actual linker
|
||||
-Xexplicit-api={strict|warning|disable}
|
||||
Force compiler to report errors on all public API declarations without explicit visibility or return type.
|
||||
Use 'warning' level to issue warnings instead of errors.
|
||||
|
||||
-1
@@ -180,7 +180,6 @@ where advanced options include:
|
||||
Enable the checks on uniqueness of signatures
|
||||
-Xexpect-actual-classes 'expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta.
|
||||
Kotlin reports a warning every time you use them. You can use this flag to mute the warning.
|
||||
-Xexpect-actual-linker Enable experimental expect/actual linker
|
||||
-Xexplicit-api={strict|warning|disable}
|
||||
Force compiler to report errors on all public API declarations without explicit visibility or return type.
|
||||
Use 'warning' level to issue warnings instead of errors.
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package test
|
||||
|
||||
import lib.*
|
||||
|
||||
val w = W()
|
||||
val v1 = fn()
|
||||
val v2 = O.o()
|
||||
val v3 = w.w()
|
||||
|
||||
// private
|
||||
val e1 = o3
|
||||
val e2 = w.o7
|
||||
val e3 = O.o10
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
package lib
|
||||
|
||||
interface I1 {
|
||||
fun i1() {}
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
fun i2() {}
|
||||
}
|
||||
|
||||
interface I3 : I2, I1
|
||||
|
||||
open class C {
|
||||
fun c() {}
|
||||
}
|
||||
|
||||
open class G<T> {
|
||||
fun g() {}
|
||||
}
|
||||
|
||||
private val o1 = object { fun foo() {} }
|
||||
private val o2 = object : I1 {}
|
||||
private val o3 = object : I1, I2 {}
|
||||
private val o4 = object : I3 {}
|
||||
private val o5 = object : C() {}
|
||||
private val o6 = object : C(), I1, I2 {}
|
||||
private val o7 = object : C(), I3 {}
|
||||
private val o8 = object : G<Int>() {}
|
||||
private val o9 = object : G<Int>(), I1, I2 {}
|
||||
private val o10 = object : G<Int>(), I3 {}
|
||||
|
||||
private val o11 = object {
|
||||
inner class D {
|
||||
fun df() {}
|
||||
}
|
||||
fun d(): D = D()
|
||||
}.d()
|
||||
|
||||
private val o12 = {
|
||||
class L {
|
||||
fun l() {}
|
||||
}
|
||||
L()
|
||||
}()
|
||||
|
||||
private val o13 = {
|
||||
class L {
|
||||
inner class L1 {
|
||||
inner class L2 {
|
||||
fun l2() {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
L().L1().L2()
|
||||
}()
|
||||
|
||||
fun fn() {
|
||||
o1.foo()
|
||||
o2.i1()
|
||||
o3.i1()
|
||||
o3.i2()
|
||||
o4.i1()
|
||||
o4.i2()
|
||||
o5.c()
|
||||
o6.c()
|
||||
o6.i1()
|
||||
o6.i2()
|
||||
o7.c()
|
||||
o7.i1()
|
||||
o7.i2()
|
||||
o8.g()
|
||||
o9.g()
|
||||
o9.i1()
|
||||
o9.i2()
|
||||
o10.g()
|
||||
o10.i1()
|
||||
o10.i2()
|
||||
o11.df()
|
||||
o12.l()
|
||||
o13.l2()
|
||||
}
|
||||
|
||||
class W {
|
||||
private val o1 = object { fun foo() {} }
|
||||
private val o2 = object : I1 {}
|
||||
private val o3 = object : I1, I2 {}
|
||||
private val o4 = object : I3 {}
|
||||
private val o5 = object : C() {}
|
||||
private val o6 = object : C(), I1, I2 {}
|
||||
private val o7 = object : C(), I3 {}
|
||||
private val o8 = object : G<Int>() {}
|
||||
private val o9 = object : G<Int>(), I1, I2 {}
|
||||
private val o10 = object : G<Int>(), I3 {}
|
||||
|
||||
fun w() {
|
||||
o1.foo()
|
||||
o2.i1()
|
||||
o3.i1()
|
||||
o3.i2()
|
||||
o4.i1()
|
||||
o4.i2()
|
||||
o5.c()
|
||||
o6.c()
|
||||
o6.i1()
|
||||
o6.i2()
|
||||
o7.c()
|
||||
o7.i1()
|
||||
o7.i2()
|
||||
o8.g()
|
||||
o9.g()
|
||||
o9.i1()
|
||||
o9.i2()
|
||||
o10.g()
|
||||
o10.i1()
|
||||
o10.i2()
|
||||
}
|
||||
}
|
||||
|
||||
object O {
|
||||
private val o1 = object { fun foo() {} }
|
||||
private val o2 = object : I1 {}
|
||||
private val o3 = object : I1, I2 {}
|
||||
private val o4 = object : I3 {}
|
||||
private val o5 = object : C() {}
|
||||
private val o6 = object : C(), I1, I2 {}
|
||||
private val o7 = object : C(), I3 {}
|
||||
private val o8 = object : G<Int>() {}
|
||||
private val o9 = object : G<Int>(), I1, I2 {}
|
||||
private val o10 = object : G<Int>(), I3 {}
|
||||
|
||||
fun o() {
|
||||
o1.foo()
|
||||
o2.i1()
|
||||
o3.i1()
|
||||
o3.i2()
|
||||
o4.i1()
|
||||
o4.i2()
|
||||
o5.c()
|
||||
o6.c()
|
||||
o6.i1()
|
||||
o6.i2()
|
||||
o7.c()
|
||||
o7.i1()
|
||||
o7.i2()
|
||||
o8.g()
|
||||
o9.g()
|
||||
o9.i1()
|
||||
o9.i2()
|
||||
o10.g()
|
||||
o10.i1()
|
||||
o10.i2()
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
warning: argument -Xexpect-actual-linker is deprecated. Please use -Xmetadata-klib instead
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlibWithOldCLIKey/anonymousObjectTypeMetadata.kt:11:10: error: cannot access 'val o3: Any': it is private in file.
|
||||
val e1 = o3
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlibWithOldCLIKey/anonymousObjectTypeMetadata.kt:12:12: error: cannot access 'val o7: Any': it is private in 'lib/W'.
|
||||
val e2 = w.o7
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlibWithOldCLIKey/anonymousObjectTypeMetadata.kt:13:12: error: cannot access 'val o10: Any': it is private in 'lib/O'.
|
||||
val e3 = O.o10
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
warning: argument -Xexpect-actual-linker is deprecated. Please use -Xmetadata-klib instead
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlibWithOldCLIKey/anonymousObjectTypeMetadata.kt:11:10: error: cannot access 'o3': it is private in file
|
||||
val e1 = o3
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlibWithOldCLIKey/anonymousObjectTypeMetadata.kt:12:12: error: cannot access 'o7': it is private in 'W'
|
||||
val e2 = w.o7
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlibWithOldCLIKey/anonymousObjectTypeMetadata.kt:13:12: error: cannot access 'o10': it is private in 'O'
|
||||
val e3 = O.o10
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
Reference in New Issue
Block a user