Minor in JS stdlib: annotate volatile and synchronized as native.
Don't generate code for this classes to avoid warnings from some minifiers. Note: volatile and synchronized was reserved word in ECMAScript 2, but is not since ECMAScript 5.
This commit is contained in:
@@ -18,8 +18,15 @@ package kotlin
|
||||
|
||||
import kotlin.InlineOption.ONLY_LOCAL_RETURN
|
||||
|
||||
// Note:
|
||||
// Right now we don't want to have neither 'volatile' nor 'synchronized' at runtime,
|
||||
// so they annotated as 'native' to avoid warnings/errors from some minifiers.
|
||||
// They was reserved word in ECMAScript 2, but is not since ECMAScript 5.
|
||||
|
||||
native
|
||||
public annotation class volatile
|
||||
|
||||
native
|
||||
public annotation class synchronized
|
||||
|
||||
public inline fun <R> synchronized(lock: Any, [inlineOptions(ONLY_LOCAL_RETURN)] block: () -> R): R = block()
|
||||
|
||||
Reference in New Issue
Block a user