Fixed external tests

Marked all mutable objects with konan.ThreadLocal annotation
This commit is contained in:
Igor Chevdar
2018-07-04 16:35:32 +03:00
parent cb916d017b
commit f4fef09447
22 changed files with 23 additions and 0 deletions
@@ -10,6 +10,7 @@ var A.w: Int
v = c + 10
}
@konan.ThreadLocal
object F {
var u = 0
}
@@ -2,6 +2,7 @@ import kotlin.reflect.KProperty
var result: String by Delegate
@konan.ThreadLocal
object Delegate {
var value = "lol"
@@ -6,6 +6,7 @@ class Outer {
}
}
@konan.ThreadLocal
companion object {
public var s = "fail"
private set
@@ -7,6 +7,7 @@ class Delegate<T>(var inner: T) {
class Foo (val f: Int) {
@konan.ThreadLocal
companion object {
val A: Foo by Delegate(Foo(11))
var B: Foo by Delegate(Foo(11))
@@ -14,6 +15,7 @@ class Foo (val f: Int) {
}
interface FooTrait {
@konan.ThreadLocal
companion object {
val A: Foo by Delegate(Foo(11))
var B: Foo by Delegate(Foo(11))
@@ -1,3 +1,4 @@
@konan.ThreadLocal
object Test {
var z = "0"
var l = 0L
@@ -2,6 +2,7 @@
import kotlin.test.*
@konan.ThreadLocal
object O {
var equalsCalled: Boolean = false
get(): Boolean {
@@ -1,3 +1,4 @@
@konan.ThreadLocal
object A {
var x = 0
@@ -18,6 +18,7 @@ open class BaseClass {
get() = this
}
@konan.ThreadLocal
object C: BaseClass(), I<String> {
fun f(s: Int) = 1
fun f(s: String) = 2
@@ -19,6 +19,7 @@ open class BaseClass {
}
class Class {
@konan.ThreadLocal
companion object C: BaseClass(), I<String> {
fun f(s: Int) = 1
fun f(s: String) = 2
@@ -1,5 +1,6 @@
// See KT-14999
@konan.ThreadLocal
object Obj {
var key = ""
var value = ""
@@ -1,5 +1,6 @@
class Test {
@konan.ThreadLocal
companion object {
public val prop1 : Int = 10
@@ -1,5 +1,6 @@
class TestObject()
{
@konan.ThreadLocal
companion object {
var prop: Int = 1
get() = field++
@@ -2,6 +2,7 @@ class CallbackBlock {}
public class Foo
{
@konan.ThreadLocal
companion object {
private var bar = 0
}
@@ -1,4 +1,5 @@
class Foo() {
@konan.ThreadLocal
companion object {
val bar = "OK";
var boo = "FAIL";
@@ -4,6 +4,7 @@ class D {
operator fun getValue(a: Any, p: KProperty<*>) { }
}
@konan.ThreadLocal
object P {
val u = Unit
val v by D()
@@ -2,6 +2,7 @@ class App {
fun init() {
s = "OK"
}
@konan.ThreadLocal
companion object {
var s: String = "Fail"
private set
@@ -8,6 +8,7 @@ public class A {
return str
}
@konan.ThreadLocal
private companion object {
private lateinit var str: String
}
@@ -14,6 +14,7 @@ class Foo {
}
}
@konan.ThreadLocal
object Bar {
lateinit var p: String
@@ -4,6 +4,7 @@
import kotlin.reflect.KProperty
import kotlin.test.assertEquals
@konan.ThreadLocal
object Delegate {
lateinit var prop: KProperty<*>
@@ -1,4 +1,5 @@
class A {
@konan.ThreadLocal
companion object {
private var r: Int = 1;
@@ -1,3 +1,4 @@
@konan.ThreadLocal
object A {
private var r: Int = 1;
@@ -1,4 +1,5 @@
class C {
@konan.ThreadLocal
companion object {
private val s: String
private var s2: String