diff --git a/kotlin-native/backend.native/tests/compilerChecks/README.md b/kotlin-native/backend.native/tests/compilerChecks/README.md index 18579637f79..ed0e58769b0 100644 --- a/kotlin-native/backend.native/tests/compilerChecks/README.md +++ b/kotlin-native/backend.native/tests/compilerChecks/README.md @@ -74,9 +74,9 @@ kotlin-native/backend.native/tests/compilerChecks/t35.kt:5:13: error: unable to kotlin-native/backend.native/tests/compilerChecks/t36.kt kotlin-native/backend.native/tests/compilerChecks/t36.kt:4:13: error: native interop types constructors must not be called directly kotlin-native/backend.native/tests/compilerChecks/t37.kt -kotlin-native/backend.native/tests/compilerChecks/t37.kt:5:5: error: subclasses of NativePointed cannot have properties with backing fields +kotlin-native/backend.native/tests/compilerChecks/t37.kt:5:5: error: subclasses of kotlinx.cinterop.NativePointed cannot have properties with backing fields kotlin-native/backend.native/tests/compilerChecks/t38.kt -kotlin-native/backend.native/tests/compilerChecks/t38.kt:5:5: error: subclasses of NativePointed cannot have properties with backing fields +kotlin-native/backend.native/tests/compilerChecks/t38.kt:5:5: error: subclasses of kotlinx.cinterop.NativePointed cannot have properties with backing fields kotlin-native/backend.native/tests/compilerChecks/t4.kt kotlin-native/backend.native/tests/compilerChecks/t4.kt:4:21: error: callable references to variadic Objective-C methods are not supported kotlin-native/backend.native/tests/compilerChecks/t40.kt @@ -106,20 +106,15 @@ kotlin-native/backend.native/tests/compilerChecks/t49.kt:5:12: error: kotlin.nat kotlin-native/backend.native/tests/compilerChecks/t5.kt kotlin-native/backend.native/tests/compilerChecks/t5.kt:4:83: error: passing String as variadic Objective-C argument is ambiguous; cast it to NSString or pass with '.cstr' as C string kotlin-native/backend.native/tests/compilerChecks/t50.kt -kotlin-native/backend.native/tests/compilerChecks/t50.kt:10:16: error: kotlin.native.concurrent.Worker.execute must take an unbound, non-capturing function or lambda, but captures at: - kotlin-native/backend.native/tests/compilerChecks/t50.kt:10:54 +kotlin-native/backend.native/tests/compilerChecks/t50.kt:11:16: error: kotlin.native.concurrent.Worker.execute must take an unbound, non-capturing function or lambda, but captures at: + kotlin-native/backend.native/tests/compilerChecks/t50.kt:11:54 kotlin-native/backend.native/tests/compilerChecks/t51.kt MISSING EXPECTED ERROR FOR kotlin-native/backend.native/tests/compilerChecks/t51.kt kotlin-native/backend.native/tests/compilerChecks/t52.kt -kotlin-native/backend.native/tests/compilerChecks/t52.kt:5:5: warning: 'createCleaner(T, (T) -> Unit): Cleaner' is deprecated. Use kotlin.native.ref.createCleaner instead. - createCleaner(42) { println(x) } - ^ - MISSING EXPECTED ERROR FOR kotlin-native/backend.native/tests/compilerChecks/t52.kt +kotlin-native/backend.native/tests/compilerChecks/t52.kt:5:5: error: kotlin.native.ref.createCleaner must take an unbound, non-capturing function or lambda, but captures at: + kotlin-native/backend.native/tests/compilerChecks/t52.kt:5:33: x kotlin-native/backend.native/tests/compilerChecks/t53.kt -kotlin-native/backend.native/tests/compilerChecks/t53.kt:9:5: warning: 'createCleaner(T, (T) -> Unit): Cleaner' is deprecated. Use kotlin.native.ref.createCleaner instead. - createCleaner(42, C(x)::bar) - ^ - MISSING EXPECTED ERROR FOR kotlin-native/backend.native/tests/compilerChecks/t53.kt +kotlin-native/backend.native/tests/compilerChecks/t53.kt:9:5: error: kotlin.native.ref.createCleaner must take an unbound, non-capturing function or lambda, but captures at: kotlin-native/backend.native/tests/compilerChecks/t54.kt kotlin-native/backend.native/tests/compilerChecks/t54.kt:1:44: error: no spread elements allowed here kotlin-native/backend.native/tests/compilerChecks/t55.kt @@ -135,7 +130,7 @@ kotlin-native/backend.native/tests/compilerChecks/t59.kt:5:5: error: non-reified kotlin-native/backend.native/tests/compilerChecks/t6.kt kotlin-native/backend.native/tests/compilerChecks/t6.kt:4:97: error: when calling variadic Objective-C methods spread operator is supported only for *arrayOf(...) kotlin-native/backend.native/tests/compilerChecks/t60.kt -kotlin-native/backend.native/tests/compilerChecks/t60.kt:4:5: error: subclasses of NativePointed cannot have properties with backing fields +kotlin-native/backend.native/tests/compilerChecks/t60.kt:4:5: error: subclasses of kotlinx.cinterop.NativePointed cannot have properties with backing fields kotlin-native/backend.native/tests/compilerChecks/t61.kt kotlin-native/backend.native/tests/compilerChecks/t61.kt:8:5: error: only companion objects of subclasses of Objective-C classes can inherit from Objective-C metaclasses kotlin-native/backend.native/tests/compilerChecks/t62.kt diff --git a/kotlin-native/backend.native/tests/compilerChecks/runtests.sh b/kotlin-native/backend.native/tests/compilerChecks/runtests.sh index 48bc38ec501..47b5d84f8c5 100755 --- a/kotlin-native/backend.native/tests/compilerChecks/runtests.sh +++ b/kotlin-native/backend.native/tests/compilerChecks/runtests.sh @@ -5,7 +5,7 @@ for TEST in kotlin-native/backend.native/tests/compilerChecks/*.kt; do echo "$TEST"; - konanc -p library -Xsuppress-version-warnings "$TEST" "$@"; + konanc -p library -opt-in=kotlinx.cinterop.ExperimentalForeignApi -opt-in=kotlinx.cinterop.BetaInteropApi -opt-in=kotlin.native.internal.InternalForKotlinNative -Xsuppress-version-warnings "$TEST" "$@"; retVal=$? if [ $retVal -eq 0 ]; then echo " MISSING EXPECTED ERROR FOR $TEST" diff --git a/kotlin-native/backend.native/tests/compilerChecks/t50.kt b/kotlin-native/backend.native/tests/compilerChecks/t50.kt index 41d5868c00a..c02e6326c4e 100644 --- a/kotlin-native/backend.native/tests/compilerChecks/t50.kt +++ b/kotlin-native/backend.native/tests/compilerChecks/t50.kt @@ -1,3 +1,4 @@ +@file:OptIn(ObsoleteWorkersApi::class) import kotlin.native.concurrent.* class Z(val x: Int) { diff --git a/kotlin-native/backend.native/tests/compilerChecks/t51.kt b/kotlin-native/backend.native/tests/compilerChecks/t51.kt index 5d3baa4a347..5de666d7a36 100644 --- a/kotlin-native/backend.native/tests/compilerChecks/t51.kt +++ b/kotlin-native/backend.native/tests/compilerChecks/t51.kt @@ -1,3 +1,4 @@ +@file:OptIn(ObsoleteWorkersApi::class) import kotlin.native.concurrent.* class Z(val x: Int) { diff --git a/kotlin-native/backend.native/tests/compilerChecks/t52.kt b/kotlin-native/backend.native/tests/compilerChecks/t52.kt index 1372cc106c5..2697203eef3 100644 --- a/kotlin-native/backend.native/tests/compilerChecks/t52.kt +++ b/kotlin-native/backend.native/tests/compilerChecks/t52.kt @@ -1,4 +1,4 @@ -import kotlin.native.internal.* +import kotlin.native.ref.* @OptIn(kotlin.ExperimentalStdlibApi::class) fun foo(x: Int) { diff --git a/kotlin-native/backend.native/tests/compilerChecks/t53.kt b/kotlin-native/backend.native/tests/compilerChecks/t53.kt index 117948147b3..4228e39a588 100644 --- a/kotlin-native/backend.native/tests/compilerChecks/t53.kt +++ b/kotlin-native/backend.native/tests/compilerChecks/t53.kt @@ -1,4 +1,4 @@ -import kotlin.native.internal.* +import kotlin.native.ref.* class C(val x: Int) { fun bar(y: Int) = println(x + y)