Add target FIELD for SinceKotlin, annotate CallableReference.receiver/NO_RECEIVER

This commit is contained in:
Alexander Udalov
2017-02-09 16:11:06 +03:00
parent 20d856fa77
commit 6793861fd4
6 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ public annotation class UnsafeVariance
* @property version the version in the following formats: `<major>.<minor>` or `<major>.<minor>.<patch>`, where major, minor and patch
* are non-negative integer numbers without leading zeros.
*/
@Target(CLASS, PROPERTY, CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER, TYPEALIAS)
@Target(CLASS, PROPERTY, FIELD, CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER, TYPEALIAS)
@Retention(AnnotationRetention.BINARY)
@MustBeDocumented
public annotation class SinceKotlin(val version: String)
@@ -40,7 +40,10 @@ public abstract class CallableReference implements KCallable {
// objects are written to it. The latter is guaranteed because both KFunctionImpl and KPropertyImpl have at least one final field.
private KCallable reflected;
@SinceKotlin(version = "1.1")
protected final Object receiver;
@SinceKotlin(version = "1.1")
public static final Object NO_RECEIVER = new Object();
public CallableReference() {