Support missing pieces (#838)

This commit is contained in:
Nikolay Igotti
2017-09-06 16:48:55 +03:00
committed by GitHub
parent ccb4caf29e
commit 5f92568347
2 changed files with 50 additions and 0 deletions
@@ -0,0 +1,31 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kotlin
// Note:
// Right now we don't want to have neither 'volatile' nor 'synchronized' at runtime.
@Target(AnnotationTarget.PROPERTY, AnnotationTarget.FIELD)
@Retention(AnnotationRetention.SOURCE)
public annotation class Volatile
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
@Retention(AnnotationRetention.SOURCE)
public annotation class Synchronized
@kotlin.internal.InlineOnly
public inline fun <R> synchronized(@Suppress("UNUSED_PARAMETER") lock: Any, crossinline block: () -> R): R = block()
@@ -108,6 +108,25 @@ public annotation class UnsafeVariance
@MustBeDocumented
public annotation class SinceKotlin(val version: String)
/**
* When applied to annotation class X specifies that X defines a DSL language
*
* The general rule:
* - an implicit receiver may *belong to a DSL @X* if marked with a corresponding DSL marker annotation
* - two implicit receivers of the same DSL are not accessible in the same scope
* - the closest one wins
* - other available receivers are resolved as usual, but if the resulting resolved call binds to such a receiver, it's a compilation error
*
* Marking rules: an implicit receiver is considered marked with @Ann if
* - its type is marked, or
* - its type's classifier is marked
* - or any of its superclasses/superinterfaces
*/
@Target(ANNOTATION_CLASS)
@Retention(BINARY)
@MustBeDocumented
@SinceKotlin("1.1")
public annotation class DslMarker
/**
* Specifies that this part of internal API is effectively public exposed by using in public inline function