Skip to content

Commit abe00fd

Browse files
committed
Add the opt-in annotations required for compiling metadata
`gradle clean check` is apparently not enough to detect all compilation problems, one must also do `gradle publishToMavenLocal` to be sure.
1 parent ed5d4d8 commit abe00fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/native/src/Instant.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private const val MAX_SECOND = 31494816403199L // +1000000-12-31T23:59:59
131131
private fun isValidInstantSecond(second: Long) = second >= MIN_SECOND && second <= MAX_SECOND
132132

133133

134-
@OptIn(ExperimentalForeignApi::class)
134+
@OptIn(ExperimentalForeignApi::class, UnsafeNumber::class)
135135
internal fun currentTime(): Instant = memScoped {
136136
val tm = alloc<timespec>()
137137
val error = clock_gettime(CLOCK_REALTIME.convert(), tm.ptr)

core/nix/src/internal/filesystem.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Use of this source code is governed by the Apache 2.0 License that can be found in the LICENSE.txt file.
44
*/
55

6-
@file:OptIn(ExperimentalForeignApi::class)
6+
@file:OptIn(ExperimentalForeignApi::class, UnsafeNumber::class)
77
package kotlinx.datetime.internal
88

99
import kotlinx.cinterop.*

0 commit comments

Comments
 (0)