Files
kotlin-fork/idea/testData/quickfix/migration/replaceJavaClassAsAnnotationParameter/manyFilesMultiple.after.kt
T
Pavel V. Talanov 07d35d305e Create import list psi element even if no directives are present
Fix a problem where deleting last import directive via "optimize imports" could lead to incorrect psi structure resulting in CCE, see EA-64291
New imports are inserted at the head (after package directive if present) of the file (before any comments) if no imports were present
Add test for inserting import to file where a first statement is a comment
Drop code dealing with non-existing import list in ImportInsertHelperImpl
AbstractQuickFixTest: check for unexpected actions before changes to the file are made as it relies on the first line having specific format
2015-06-08 20:51:04 +03:00

27 lines
709 B
Kotlin
Vendored

import kotlin.reflect.KClass
// "Replace Class<T> with KClass<T> for each annotation in project" "true"
// WITH_RUNTIME
annotation class Ann1(val arg: KClass<*>)
Ann1(String::class) class MyClass1
Ann1(MyClass1::class) class MyClass2
annotation class Ann2(val arg: Array<KClass<*>>)
Ann2(arg = array(Double::class)) class MyClass3 [Ann1(Char::class)] () {
annotation class Ann3(val arg: KClass<*> = Any::class)
Ann3(String::class) class Nested {
Ann1(arg = String::class) fun foo1() {
annotation class LocalAnn(val arg: KClass<*>)
[LocalAnn(Class::class)] val x = 1
}
}
inner AnnO(Double::class) class Inner
}
AnnO(Boolean::class) class Another