Make annotations-modifiers private and fix some lost usages

It's needed to prevent usages of them as real annotation/type.
But we can't remove them, because currently some modifiers
are artificially resolved as annotations of those classes.
This commit is contained in:
Denis Zharkov
2015-09-22 12:41:34 +03:00
parent 4a993f517e
commit dcb84a7d0a
6 changed files with 23 additions and 23 deletions
+6 -6
View File
@@ -1236,26 +1236,26 @@ public object Unit {
/*primary*/ private constructor Unit()
}
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) @kotlin.annotation.Retention(value = AnnotationRetention.RUNTIME) @kotlin.annotation.MustBeDocumented() @kotlin.annotation.annotation() public final class crossinline : kotlin.Annotation {
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) @kotlin.annotation.Retention(value = AnnotationRetention.RUNTIME) @kotlin.annotation.MustBeDocumented() @kotlin.annotation.annotation() private final class crossinline : kotlin.Annotation {
/*primary*/ public constructor crossinline()
}
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS}) @kotlin.annotation.MustBeDocumented() @kotlin.annotation.annotation() public final class data : kotlin.Annotation {
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS}) @kotlin.annotation.MustBeDocumented() @kotlin.annotation.annotation() private final class data : kotlin.Annotation {
/*primary*/ public constructor data()
}
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER}) @kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) @kotlin.annotation.MustBeDocumented() @kotlin.annotation.annotation() public final class external : kotlin.Annotation {
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER}) @kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) @kotlin.annotation.MustBeDocumented() @kotlin.annotation.annotation() private final class external : kotlin.Annotation {
/*primary*/ public constructor external()
}
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY}) @kotlin.annotation.Retention(value = AnnotationRetention.RUNTIME) @kotlin.annotation.MustBeDocumented() @kotlin.annotation.annotation() public final class inline : kotlin.Annotation {
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY}) @kotlin.annotation.Retention(value = AnnotationRetention.RUNTIME) @kotlin.annotation.MustBeDocumented() @kotlin.annotation.annotation() private final class inline : kotlin.Annotation {
/*primary*/ public constructor inline()
}
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) @kotlin.annotation.Retention(value = AnnotationRetention.RUNTIME) @kotlin.annotation.MustBeDocumented() @kotlin.annotation.annotation() public final class noinline : kotlin.Annotation {
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) @kotlin.annotation.Retention(value = AnnotationRetention.RUNTIME) @kotlin.annotation.MustBeDocumented() @kotlin.annotation.annotation() private final class noinline : kotlin.Annotation {
/*primary*/ public constructor noinline()
}
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FUNCTION}) @kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) @kotlin.annotation.annotation() public final class tailrec : kotlin.Annotation {
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FUNCTION}) @kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) @kotlin.annotation.annotation() private final class tailrec : kotlin.Annotation {
/*primary*/ public constructor tailrec()
}
@@ -1,27 +1,27 @@
class C {
companion object {
val defaultGetter: Int = 1
@external get
external get
var defaultSetter: Int = 1
@external get
@external set
external get
external set
}
val defaultGetter: Int = 1
@external get
external get
var defaultSetter: Int = 1
@external get
@external set
external get
external set
}
val defaultGetter: Int = 1
@external get
external get
var defaultSetter: Int = 1
@external get
@external set
external get
external set
fun check(body: () -> Unit, signature: String): String? {
try {
+1 -1
View File
@@ -1,4 +1,4 @@
>>> @[data] class Person(val name: String)
>>> data class Person(val name: String)
>>> var x: String? = "hello"
>>> val y = x?.let { Person(it) }
>>> y
+3 -3
View File
@@ -28,7 +28,7 @@ import kotlin.annotation.AnnotationTarget.*
*/
@Target(CLASS)
@MustBeDocumented
public annotation class data
private annotation class data
/**
* Marks the annotated class, function, property, variable or parameter as deprecated.
@@ -82,7 +82,7 @@ public annotation class Suppress(vararg val names: String)
*/
@Target(FUNCTION)
@Retention(SOURCE)
public annotation class tailrec
private annotation class tailrec
/**
* Hides the annotated function, property or constructor from the overload resolution,
@@ -101,4 +101,4 @@ public annotation class HiddenDeclaration
@Target(FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER)
@Retention(SOURCE)
@MustBeDocumented
public annotation class external
private annotation class external
+3 -3
View File
@@ -23,7 +23,7 @@ package kotlin
@Target(AnnotationTarget.VALUE_PARAMETER)
@Retention(AnnotationRetention.RUNTIME)
@MustBeDocumented
public annotation class noinline
private annotation class noinline
/**
* Enables inlining of the annotated function and the function literals that it takes as parameters into the
@@ -37,7 +37,7 @@ public annotation class noinline
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
@Retention(AnnotationRetention.RUNTIME)
@MustBeDocumented
public annotation class inline
private annotation class inline
/**
* Forbids use of non-local control flow statements within lambdas passed as arguments for this parameter.
@@ -45,4 +45,4 @@ public annotation class inline
@Target(AnnotationTarget.VALUE_PARAMETER)
@Retention(AnnotationRetention.RUNTIME)
@MustBeDocumented
public annotation class crossinline
private annotation class crossinline
@@ -83,7 +83,7 @@ public annotation class Target(vararg val allowedTargets: AnnotationTarget)
@Target(AnnotationTarget.ANNOTATION_CLASS)
@Retention(AnnotationRetention.SOURCE)
@MustBeDocumented
public annotation class annotation
private annotation class annotation
/**
* This meta-annotation determines whether an annotation is stored in binary output and visible for reflection. By default, both are true.