Add intentions for specifying use-site targets for an annotation

So #KT-19871 Fixed
This commit is contained in:
Toshiaki Kameyama
2018-03-14 04:06:05 +03:00
committed by Mikhail Glukhikh
parent e162749366
commit e06c13732f
124 changed files with 1778 additions and 0 deletions
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: delegate
// WITH_RUNTIME
annotation class A
class Property {
@A<caret>
val foo: String by lazy { "" }
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: delegate
// WITH_RUNTIME
annotation class A
class Property {
@delegate:A
val foo: String by lazy { "" }
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: field
// WITH_RUNTIME
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String by lazy { "" }
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: file
// WITH_RUNTIME
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String by lazy { "" }
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: get
// WITH_RUNTIME
annotation class A
class Property {
@A<caret>
val foo: String by lazy { "" }
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: get
// WITH_RUNTIME
annotation class A
class Property {
@get:A
val foo: String by lazy { "" }
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: param
// WITH_RUNTIME
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String by lazy { "" }
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: property
// WITH_RUNTIME
annotation class A
class Property {
@A<caret>
val foo: String by lazy { "" }
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: property
// WITH_RUNTIME
annotation class A
class Property {
@property:A
val foo: String by lazy { "" }
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: receiver
// WITH_RUNTIME
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String by lazy { "" }
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: set
// WITH_RUNTIME
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String by lazy { "" }
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: setparam
// WITH_RUNTIME
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String by lazy { "" }
}
@@ -0,0 +1,10 @@
// IS_APPLICABLE: false
annotation class A
class Property {
fun test() {
@A<caret>
val foo: String = ""
}
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: delegate
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: field
annotation class A
class Property {
@A<caret>
val foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: field
annotation class A
class Property {
@field:A
val foo: String = ""
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: file
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: get
annotation class A
class Property {
@A<caret>
val foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: get
annotation class A
class Property {
@get:A
val foo: String = ""
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: param
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: property
annotation class A
class Property {
@A<caret>
val foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: property
annotation class A
class Property {
@property:A
val foo: String = ""
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: receiver
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String = ""
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: set
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String = ""
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: setparam
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String = ""
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: delegate
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String
get() = ""
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: field
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String
get() = ""
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: file
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String
get() = ""
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: get
annotation class A
class Property {
@A<caret>
val foo: String
get() = ""
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: get
annotation class A
class Property {
@get:A
val foo: String
get() = ""
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: param
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String
get() = ""
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: property
annotation class A
class Property {
@A<caret>
val foo: String
get() = ""
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: property
annotation class A
class Property {
@property:A
val foo: String
get() = ""
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: receiver
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String
get() = ""
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: set
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String
get() = ""
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: setparam
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
val foo: String
get() = ""
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: delegate
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
var foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: field
annotation class A
class Property {
@A<caret>
var foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: field
annotation class A
class Property {
@field:A
var foo: String = ""
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: file
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
var foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: get
annotation class A
class Property {
@A<caret>
var foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: get
annotation class A
class Property {
@get:A
var foo: String = ""
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: param
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
var foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: property
annotation class A
class Property {
@A<caret>
var foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: property
annotation class A
class Property {
@property:A
var foo: String = ""
}
@@ -0,0 +1,9 @@
// CHOOSE_USE_SITE_TARGET: receiver
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
var foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: set
annotation class A
class Property {
@A<caret>
var foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: set
annotation class A
class Property {
@set:A
var foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: setparam
annotation class A
class Property {
@A<caret>
var foo: String = ""
}
@@ -0,0 +1,8 @@
// CHOOSE_USE_SITE_TARGET: setparam
annotation class A
class Property {
@setparam:A
var foo: String = ""
}
@@ -0,0 +1,11 @@
// CHOOSE_USE_SITE_TARGET: delegate
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
var foo: String
get() = ""
set(p) {}
}
@@ -0,0 +1,11 @@
// CHOOSE_USE_SITE_TARGET: field
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
var foo: String
get() = ""
set(p) {}
}
@@ -0,0 +1,11 @@
// CHOOSE_USE_SITE_TARGET: file
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
var foo: String
get() = ""
set(p) {}
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: get
annotation class A
class Property {
@A<caret>
var foo: String
get() = ""
set(p) {}
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: get
annotation class A
class Property {
@get:A
var foo: String
get() = ""
set(p) {}
}
@@ -0,0 +1,11 @@
// CHOOSE_USE_SITE_TARGET: param
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
var foo: String
get() = ""
set(p) {}
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: property
annotation class A
class Property {
@A<caret>
var foo: String
get() = ""
set(p) {}
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: property
annotation class A
class Property {
@property:A
var foo: String
get() = ""
set(p) {}
}
@@ -0,0 +1,11 @@
// CHOOSE_USE_SITE_TARGET: receiver
// IS_APPLICABLE: false
annotation class A
class Property {
@A<caret>
var foo: String
get() = ""
set(p) {}
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: set
annotation class A
class Property {
@A<caret>
var foo: String
get() = ""
set(p) {}
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: set
annotation class A
class Property {
@set:A
var foo: String
get() = ""
set(p) {}
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: setparam
annotation class A
class Property {
@A<caret>
var foo: String
get() = ""
set(p) {}
}
@@ -0,0 +1,10 @@
// CHOOSE_USE_SITE_TARGET: setparam
annotation class A
class Property {
@setparam:A
var foo: String
get() = ""
set(p) {}
}