Fix running stdlib tests in worker on Native
Add `@SharedImmutable` or `@ThreadLocal` where required.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
package test.comparisons
|
||||
|
||||
import kotlin.native.concurrent.SharedImmutable
|
||||
import kotlin.test.*
|
||||
|
||||
data class Item(val name: String, val rating: Int) : Comparable<Item> {
|
||||
@@ -13,6 +14,7 @@ data class Item(val name: String, val rating: Int) : Comparable<Item> {
|
||||
}
|
||||
}
|
||||
|
||||
@SharedImmutable
|
||||
val STRING_CASE_INSENSITIVE_ORDER: Comparator<String> =
|
||||
compareBy { it: String -> it.toUpperCase() }.thenBy { it.toLowerCase() }.thenBy { it }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user