07d35d305e
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
17 lines
987 B
Plaintext
Vendored
17 lines
987 B
Plaintext
Vendored
import kotlin.reflect.KClass
|
|
|
|
// "Replace Class<T> with KClass<T> in whole annotation" "true"
|
|
// ERROR: <html>Type inference failed. Expected type mismatch: <table><tr><td>required: </td><td><b>kotlin.reflect.KClass<*></b></td></tr><tr><td>found: </td><td><font color=red><b>java.lang.Class<???></b></font></td></tr></table></html>
|
|
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.reflect.KClass<*></td></tr><tr><td>Found:</td><td>java.lang.Class<[ERROR : Err]></td></tr></table></html>
|
|
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.reflect.KClass<*></td></tr><tr><td>Found:</td><td>java.lang.Class<kotlin.Double></td></tr></table></html>
|
|
// ERROR: Unresolved reference: Err
|
|
// WITH_RUNTIME
|
|
|
|
annotation class Ann(vararg val arg: KClass<*>)
|
|
|
|
Ann(String::class, javaClass<Err>()) class MyClass1
|
|
Ann(String::class, javaClass()) class MyClass2
|
|
|
|
val x = javaClass<Double>()
|
|
Ann(String::class, x) class MyClass3
|