From 87b85ce978ee43b724bfa5aa0f433f1d573ddf69 Mon Sep 17 00:00:00 2001 From: Dmitry Savvinov Date: Wed, 11 Oct 2017 18:03:21 +0300 Subject: [PATCH] Fix testdata for tests which use varargs Change tests to use new syntax for array literals to prevent deprecation warnings (see KT-20171). --- .../annotationParameters/valueArrayAndOtherDefault.kt | 4 ++-- .../javaAnnotationsWithKClassParameter/valueArray.kt | 2 +- idea/testData/android/lint/toast.kt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.kt index 3d8cac42a35..ad2aa0aa42a 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.kt @@ -23,5 +23,5 @@ public @interface A { @A fun test8() {} @A(x = Any::class, *arrayOf("5", "6"), "7", y = 3) fun test9() {} -@A(x = Any::class, value = *arrayOf("5", "6"), "7", y = 3) fun test10() {} -@A(x = Any::class, value = *arrayOf("5", "6", "7"), y = 3) fun test11() {} +@A(x = Any::class, value = ["5", "6"], "7", y = 3) fun test10() {} +@A(x = Any::class, value = ["5", "6", "7"], y = 3) fun test11() {} diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueArray.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueArray.kt index 82f4b1623c2..4fb56532c42 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueArray.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueArray.kt @@ -6,4 +6,4 @@ public @interface A { // FILE: b.kt @A(String::class, Int::class) class MyClass1 @A(*arrayOf(String::class, Int::class)) class MyClass2 -@A(value = *arrayOf(String::class, Int::class)) class MyClass3 +@A(value = [String::class, Int::class]) class MyClass3 diff --git a/idea/testData/android/lint/toast.kt b/idea/testData/android/lint/toast.kt index 0b03f46a5e7..fb5cef856ed 100644 --- a/idea/testData/android/lint/toast.kt +++ b/idea/testData/android/lint/toast.kt @@ -66,7 +66,7 @@ class ToastTest(context: Context) : Activity() { @android.annotation.SuppressLint("ShowToast", "Lorem ipsum") val toast2 = Toast.makeText(this, "MyToast", Toast.LENGTH_LONG) - @android.annotation.SuppressLint(value = "ShowToast") + @android.annotation.SuppressLint(value = ["ShowToast"]) val toast3 = Toast.makeText(this, "MyToast", Toast.LENGTH_LONG) }