Disallowed @Deprecated for local variables and parameters
This commit is contained in:
+1
-1
@@ -283,7 +283,7 @@ public interface Comparable</*0*/ in T> {
|
|||||||
public abstract fun compareTo(/*0*/ other: T): kotlin.Int
|
public abstract fun compareTo(/*0*/ other: T): kotlin.Int
|
||||||
}
|
}
|
||||||
|
|
||||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER}) @kotlin.annotation.MustBeDocumented() @kotlin.annotation.annotation() public final class Deprecated : kotlin.Annotation {
|
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.PROPERTY_GETTER}) @kotlin.annotation.MustBeDocumented() @kotlin.annotation.annotation() public final class Deprecated : kotlin.Annotation {
|
||||||
/*primary*/ public constructor Deprecated(/*0*/ value: kotlin.String, /*1*/ replaceWith: kotlin.ReplaceWith = ...)
|
/*primary*/ public constructor Deprecated(/*0*/ value: kotlin.String, /*1*/ replaceWith: kotlin.ReplaceWith = ...)
|
||||||
public final val replaceWith: kotlin.ReplaceWith
|
public final val replaceWith: kotlin.ReplaceWith
|
||||||
public final fun <get-replaceWith>(): kotlin.ReplaceWith
|
public final fun <get-replaceWith>(): kotlin.ReplaceWith
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package test
|
package test
|
||||||
|
|
||||||
enum class MyEnum(@param:Deprecated("") @property:Deprecated("") val ord: Int) {
|
annotation class AAA
|
||||||
|
|
||||||
|
enum class MyEnum(@param:AAA @property:Deprecated("") val ord: Int) {
|
||||||
ENTRY(239);
|
ENTRY(239);
|
||||||
|
|
||||||
fun f(@java.lang.Deprecated p: Int) {
|
fun f(@java.lang.Deprecated p: Int) {
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
package test
|
package test
|
||||||
|
|
||||||
|
@kotlin.annotation.annotation() public final class AAA : kotlin.Annotation {
|
||||||
|
public constructor AAA()
|
||||||
|
}
|
||||||
|
|
||||||
public final enum class MyEnum : kotlin.Enum<test.MyEnum> {
|
public final enum class MyEnum : kotlin.Enum<test.MyEnum> {
|
||||||
enum entry ENTRY
|
enum entry ENTRY
|
||||||
|
|
||||||
private constructor MyEnum(/*0*/ @kotlin.Deprecated(value = "") kotlin.Int)
|
private constructor MyEnum(/*0*/ @test.AAA() kotlin.Int)
|
||||||
@kotlin.Deprecated(value = "") public final val ord: kotlin.Int
|
@kotlin.Deprecated(value = "") public final val ord: kotlin.Int
|
||||||
protected final /*fake_override*/ fun clone(): kotlin.Any
|
protected final /*fake_override*/ fun clone(): kotlin.Any
|
||||||
public final /*fake_override*/ fun compareTo(/*0*/ test.MyEnum): kotlin.Int
|
public final /*fake_override*/ fun compareTo(/*0*/ test.MyEnum): kotlin.Int
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ public annotation class data
|
|||||||
* @property replaceWith if present, specifies a code fragment which should be used as a replacement for
|
* @property replaceWith if present, specifies a code fragment which should be used as a replacement for
|
||||||
* the deprecated API usage.
|
* the deprecated API usage.
|
||||||
*/
|
*/
|
||||||
@Target(CLASS, FUNCTION, PROPERTY, ANNOTATION_CLASS, CONSTRUCTOR, PROPERTY_SETTER, PROPERTY_GETTER,
|
@Target(CLASS, FUNCTION, PROPERTY, ANNOTATION_CLASS, CONSTRUCTOR, PROPERTY_SETTER, PROPERTY_GETTER)
|
||||||
LOCAL_VARIABLE, VALUE_PARAMETER)
|
|
||||||
@MustBeDocumented
|
@MustBeDocumented
|
||||||
public annotation class Deprecated(val value: String, val replaceWith: ReplaceWith = ReplaceWith(""))
|
public annotation class Deprecated(val value: String, val replaceWith: ReplaceWith = ReplaceWith(""))
|
||||||
|
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ package test
|
|||||||
@dependency.A @dependency.B @dependency.C @kotlin.data public final class Annotations public constructor() {
|
@dependency.A @dependency.B @dependency.C @kotlin.data public final class Annotations public constructor() {
|
||||||
@dependency.A @dependency.B @dependency.C @kotlin.inline public final val p: @dependency.B kotlin.Int /* compiled code */
|
@dependency.A @dependency.B @dependency.C @kotlin.inline public final val p: @dependency.B kotlin.Int /* compiled code */
|
||||||
|
|
||||||
@dependency.A @dependency.B @dependency.C @kotlin.inline public final fun f(@dependency.A @dependency.B @dependency.C @kotlin.Deprecated i: @dependency.A kotlin.Int): kotlin.Unit { /* compiled code */ }
|
@dependency.A @dependency.B @dependency.C @kotlin.inline public final fun f(@dependency.A @dependency.B @dependency.C i: @dependency.A kotlin.Int): kotlin.Unit { /* compiled code */ }
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ import dependency.*
|
|||||||
|
|
||||||
data @A("a") @B(1) @C class Annotations {
|
data @A("a") @B(1) @C class Annotations {
|
||||||
|
|
||||||
inline @A("f") @B(2) @C fun f(@A("i") @B(3) @C @Deprecated("1") i: @A("int") Int) {
|
inline @A("f") @B(2) @C fun f(@A("i") @B(3) @C i: @A("int") Int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline @A("p") @B(3) @C val p: @B(4) Int = 2
|
inline @A("p") @B(3) @C val p: @B(4) Int = 2
|
||||||
|
|||||||
Reference in New Issue
Block a user