fix some tests for as36
This commit is contained in:
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
class DefaultValueChain(
|
||||
val x1: Int,
|
||||
x2: Int = x1,
|
||||
val x3: Int = x2,
|
||||
x4: Int = x3,
|
||||
val x5: Int = x4
|
||||
) {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'firstOrNull{}'"
|
||||
// IS_APPLICABLE_2: false
|
||||
|
||||
fun getFirstValue() = "value"
|
||||
|
||||
fun foo(list: List<String?>): String? {
|
||||
val value = getFirstValue()
|
||||
val found: String? =
|
||||
list.firstOrNull { it != null && !it.startsWith("IMG:") && it.contains(value) }
|
||||
return found
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
annotation class Ann1(val i: Int, val j: Int)
|
||||
|
||||
@Target(AnnotationTarget.PROPERTY)
|
||||
annotation class Ann2(val i: Int, val j: Int)
|
||||
|
||||
@Target(AnnotationTarget.FIELD)
|
||||
annotation class Ann3(val i: Int, val j: Int)
|
||||
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.FIELD, AnnotationTarget.PROPERTY)
|
||||
annotation class Ann4(val i: Int, val j: Int)
|
||||
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.FIELD)
|
||||
annotation class Ann5(val i: Int, val j: Int)
|
||||
|
||||
class Test(
|
||||
@get:Ann1(0, 0) @property:Ann1(1, 11) @Ann2(2, 22) @Ann3(3, 33) @property:Ann4(
|
||||
4,
|
||||
44
|
||||
) @field:Ann5(5, 55) val foo: String = ""
|
||||
) {
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
annotation class Annotation1(val a: Int = 0)
|
||||
annotation class Annotation2(val a: Int = 0)
|
||||
annotation class Annotation3(val a: Int = 0)
|
||||
|
||||
|
||||
class TestClass(
|
||||
private @property:Annotation1(42) @field:Annotation2(42) @Annotation1(42) @Annotation3(
|
||||
42
|
||||
) val text: String = "LoremIpsum"
|
||||
) {
|
||||
}
|
||||
Reference in New Issue
Block a user