Add quickfix for JAVA_TYPE_MISMATCH

This commit is contained in:
Denis Zharkov
2015-08-31 19:54:01 +03:00
parent 632e336782
commit c17451cf5c
6 changed files with 57 additions and 1 deletions
@@ -0,0 +1,6 @@
// "Cast expression 'x' to 'List<Any>?'" "true"
// ERROR: Java type mismatch expected kotlin.(Mutable)List<kotlin.Any!>! but found kotlin.MutableList<kotlin.String>. Use explicit cast
fun main(x: MutableList<String>) {
A.foo(x as List<Any>?)
}
@@ -0,0 +1,6 @@
// "Cast expression 'x' to 'List<Any>?'" "true"
// ERROR: Java type mismatch expected kotlin.(Mutable)List<kotlin.Any!>! but found kotlin.MutableList<kotlin.String>. Use explicit cast
fun main(x: MutableList<String>) {
A.foo(<caret>x)
}
@@ -0,0 +1,5 @@
import java.util.*
class A {
static void foo(List<Object> x) {}
}