Update testData for restricted expression annotations retention

This commit is contained in:
Dmitry Petrov
2018-07-19 12:28:16 +03:00
parent 92a8448042
commit acf0bb349c
27 changed files with 31 additions and 15 deletions
@@ -1,4 +1,5 @@
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Annotation annotation class Annotation
fun box(): String { fun box(): String {
@@ -3,6 +3,7 @@ annotation class Ann
@Ann open class My @Ann open class My
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class AnnExpr annotation class AnnExpr
fun foo() { fun foo() {
@@ -3,6 +3,7 @@
public annotation class Ann public annotation class Ann
@kotlin.annotation.Target @kotlin.annotation.Target
@kotlin.annotation.Retention
@java.lang.annotation.Retention @java.lang.annotation.Retention
@java.lang.annotation.Target @java.lang.annotation.Target
@kotlin.Metadata @kotlin.Metadata
@@ -5,6 +5,7 @@ annotation class ClsAnn
annotation class FunAnn annotation class FunAnn
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class ExprAnn annotation class ExprAnn
fun bar(arg: () -> Int) = arg() fun bar(arg: () -> Int) = arg()
@@ -5,6 +5,7 @@
public annotation class ClsAnn public annotation class ClsAnn
@kotlin.annotation.Target @kotlin.annotation.Target
@kotlin.annotation.Retention
@java.lang.annotation.Retention @java.lang.annotation.Retention
@java.lang.annotation.Target @java.lang.annotation.Target
@kotlin.Metadata @kotlin.Metadata
@@ -87,17 +87,3 @@ public interface F {
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
} }
} }
public interface F {
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
public companion object Companion {
private constructor Companion()
@kotlin.jvm.JvmField public open val a: kotlin.Int = 3
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
@@ -8,4 +8,5 @@ fun foo() {}
fun ((Int) -> Unit).doIt() {} fun ((Int) -> Unit).doIt() {}
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann(val bar: String) annotation class Ann(val bar: String)
@@ -1,4 +1,5 @@
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann annotation class Ann
fun foo(arg: String?) { fun foo(arg: String?) {
@@ -1,4 +1,5 @@
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann annotation class Ann
fun foo(arg: String?) { fun foo(arg: String?) {
@@ -1,6 +1,7 @@
var b = true var b = true
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann annotation class Ann
fun println(s: String) {} fun println(s: String) {}
@@ -1,6 +1,7 @@
var b = true var b = true
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann annotation class Ann
fun println(s: String) {} fun println(s: String) {}
@@ -1,4 +1,5 @@
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class ann annotation class ann
fun foo(): Int = <caret>@ann 1 fun foo(): Int = <caret>@ann 1
@@ -1,4 +1,5 @@
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class ann annotation class ann
fun foo(): Int { fun foo(): Int {
@@ -1,6 +1,7 @@
var b = true var b = true
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann annotation class Ann
fun foo() { fun foo() {
@@ -1,6 +1,7 @@
var b = true var b = true
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann annotation class Ann
fun foo() { fun foo() {
@@ -1,4 +1,5 @@
// "Add annotation target" "true" // "Add annotation target" "true"
@Retention(AnnotationRetention.SOURCE)
annotation class Foo annotation class Foo
fun test() { fun test() {
@@ -1,5 +1,6 @@
// "Add annotation target" "true" // "Add annotation target" "true"
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Foo annotation class Foo
fun test() { fun test() {
@@ -1,6 +1,7 @@
// "Add new line after annotations" "true" // "Add new line after annotations" "true"
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann annotation class Ann
fun foo(y: Int) { fun foo(y: Int) {
@@ -1,6 +1,7 @@
// "Add new line after annotations" "true" // "Add new line after annotations" "true"
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann annotation class Ann
fun foo(y: Int) { fun foo(y: Int) {
@@ -1,9 +1,11 @@
// "Add new line after annotations" "true" // "Add new line after annotations" "true"
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann annotation class Ann
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann2(val x: String) annotation class Ann2(val x: String)
fun foo(y: Int) { fun foo(y: Int) {
@@ -1,9 +1,11 @@
// "Add new line after annotations" "true" // "Add new line after annotations" "true"
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann annotation class Ann
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann2(val x: String) annotation class Ann2(val x: String)
fun foo(y: Int) { fun foo(y: Int) {
@@ -1,6 +1,7 @@
// "Add new line after annotations" "true" // "Add new line after annotations" "true"
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann annotation class Ann
fun foo(y: IntArray) { fun foo(y: IntArray) {
@@ -1,6 +1,7 @@
// "Add new line after annotations" "true" // "Add new line after annotations" "true"
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann annotation class Ann
fun foo(y: IntArray) { fun foo(y: IntArray) {
@@ -1,9 +1,11 @@
// "Add new line after annotations" "true" // "Add new line after annotations" "true"
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann annotation class Ann
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann2(val x: String) annotation class Ann2(val x: String)
fun foo(y: Int) { fun foo(y: Int) {
@@ -1,9 +1,11 @@
// "Add new line after annotations" "true" // "Add new line after annotations" "true"
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann annotation class Ann
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann2(val x: String) annotation class Ann2(val x: String)
fun foo(y: Int) { fun foo(y: Int) {
@@ -5,4 +5,5 @@ fun foo() {
} }
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class ann annotation class ann
@@ -6,4 +6,5 @@ fun foo() {
} }
@Target(AnnotationTarget.EXPRESSION) @Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class ann annotation class ann