Capitalize copies of JVM annotations for js stdlib

This commit is contained in:
Denis Zharkov
2015-09-15 16:48:52 +03:00
parent e401a98a2b
commit 53bccec50d
5 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -26,11 +26,11 @@ import kotlin.InlineOption.ONLY_LOCAL_RETURN
@native
@Target(AnnotationTarget.PROPERTY, AnnotationTarget.FIELD)
@Retention(AnnotationRetention.SOURCE)
public annotation class volatile
public annotation class Volatile
@native
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
@Retention(AnnotationRetention.SOURCE)
public annotation class synchronized
public annotation class Synchronized
public inline fun <R> synchronized(lock: Any, crossinline block: () -> R): R = block()
+1 -1
View File
@@ -17,7 +17,7 @@
package kotlin
private class ConstrainedOnceSequence<T>(sequence: Sequence<T>) : Sequence<T> {
@volatile private var sequenceRef: Sequence<T>? = sequence
@Volatile private var sequenceRef: Sequence<T>? = sequence
//private val lock = Any()
//TODO: Synchronize with the synchonized() method
@@ -189,7 +189,7 @@ private class LazyVal<T>(private val initializer: () -> T) : ReadOnlyProperty<An
private class BlockingLazyVal<T>(lock: Any?, private val initializer: () -> T) : ReadOnlyProperty<Any?, T> {
private val lock = lock ?: this
@volatile private var value: Any? = null
@Volatile private var value: Any? = null
public override fun get(thisRef: Any?, property: PropertyMetadata): T {
val _v1 = value
+1 -1
View File
@@ -738,7 +738,7 @@ public fun String.indexOf(char: Char, startIndex: Int = 0, ignoreCase: Boolean =
* @param ignoreCase `true` to ignore character case when matching a string. By default `false`.
* @returns An index of the first occurrence of [string] or -1 if none is found.
*/
@kotlin.jvm.jvmOverloads
@kotlin.jvm.JvmOverloads
public fun String.indexOf(string: String, startIndex: Int = 0, ignoreCase: Boolean = false): Int {
return if (ignoreCase)
indexOfAny(listOf(string), startIndex, ignoreCase)
+1 -1
View File
@@ -53,7 +53,7 @@ private object UNINITIALIZED_VALUE
private open class LazyImpl<out T>(initializer: () -> T) : Lazy<T>(), Serializable {
private var initializer: (() -> T)? = initializer
@volatile private var _value: Any? = UNINITIALIZED_VALUE
@Volatile private var _value: Any? = UNINITIALIZED_VALUE
protected open val lock: Any
get() = this