OptIn ExperimentalNativeApi

This commit is contained in:
Abduqodiri Qurbonzoda
2023-06-17 11:50:29 +03:00
committed by Space Team
parent aae8a687a4
commit 209c916a7e
94 changed files with 123 additions and 67 deletions
+2
View File
@@ -5,6 +5,8 @@
// ASSERTIONS_MODE: always-enable
// WITH_STDLIB
@file:Suppress("OPT_IN_USAGE_ERROR") // ExperimentalNativeApi is defined only in Native
fun checkTrue(): Boolean {
var hit = false
val l = { hit = true; true }
+1
View File
@@ -6,6 +6,7 @@
// WITH_STDLIB
@Suppress("OPT_IN_USAGE_ERROR") // ExperimentalNativeApi is defined only in Native
fun box(): String {
kotlin.assert(true)
return "OK"
@@ -10,6 +10,7 @@ import kotlin.concurrent.*
var y = -1
fun box() : String {
@OptIn(kotlin.experimental.ExperimentalNativeApi::class)
if (Platform.memoryModel != MemoryModel.EXPERIMENTAL) {
// The test doesn't make sense for legacy mm, you can't have anything non-atomic to protect with @Volatile var
return "OK"