Remove @data from stdlib and compiler

This commit is contained in:
Alexey Tsvetkov
2015-10-14 15:22:32 +03:00
parent 264bd5235b
commit ec57d3f144
9 changed files with 20 additions and 45 deletions
-10
View File
@@ -20,16 +20,6 @@ import kotlin.annotation.AnnotationRetention.BINARY
import kotlin.annotation.AnnotationRetention.SOURCE
import kotlin.annotation.AnnotationTarget.*
/**
* Marks the annotated class as a data class. The compiler automatically generates
* equals()/hashCode(), toString(), componentN() and copy() functions for data classes.
* See [the Kotlin language documentation](http://kotlinlang.org/docs/reference/data-classes.html)
* for more information.
*/
@Target(CLASS)
@MustBeDocumented
private annotation class data
/**
* Marks the annotated class, function, property, variable or parameter as deprecated.
* @property message the message explaining the deprecation and recommending an alternative API to use.
@@ -138,7 +138,6 @@ public abstract class KotlinBuiltIns {
public final FqName throwable = fqName("Throwable");
public final FqName data = fqName("data");
public final FqName deprecated = fqName("Deprecated");
public final FqName tailRecursive = fqName("tailrec");
public final FqName inline = fqName("inline");
@@ -1029,10 +1028,6 @@ public abstract class KotlinBuiltIns {
return FQ_NAMES.cloneable.equals(getFqName(descriptor));
}
public static boolean isData(@NotNull ClassDescriptor classDescriptor) {
return containsAnnotation(classDescriptor, FQ_NAMES.data);
}
public static boolean isDeprecated(@NotNull DeclarationDescriptor declarationDescriptor) {
return containsAnnotation(declarationDescriptor, FQ_NAMES.deprecated);
}
@@ -28,7 +28,7 @@ import org.jetbrains.kotlin.types.Variance
// Please synchronize this set with JetTokens.ANNOTATION_MODIFIERS_KEYWORDS_ARRAY
public val ANNOTATION_MODIFIERS_FQ_NAMES: Set<FqName> =
arrayOf("data", "inline", "noinline", "tailrec", "external", "annotation.annotation", "crossinline").map { FqName("kotlin.$it") }.toSet()
arrayOf("inline", "noinline", "tailrec", "external", "annotation.annotation", "crossinline").map { FqName("kotlin.$it") }.toSet()
public fun KotlinBuiltIns.createDeprecatedAnnotation(message: String, replaceWith: String): AnnotationDescriptor {
val deprecatedAnnotation = deprecatedAnnotation