J2K does not convert usages of java "get" methods into "[]" (explicit "operator" modifier is required)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// ERROR: Type mismatch: inferred type is kotlin.String? but kotlin.String was expected
|
||||
import java.util.HashMap
|
||||
import kotlinApi.KotlinClass
|
||||
import javaApi.JavaClass
|
||||
|
||||
internal class X {
|
||||
operator fun get(index: Int): Int {
|
||||
@@ -20,4 +21,8 @@ internal class C {
|
||||
fun foo(kotlinClass: KotlinClass): Int {
|
||||
return kotlinClass.get(0) // not operator!
|
||||
}
|
||||
}
|
||||
|
||||
fun foo(javaClass: JavaClass): Int {
|
||||
return javaClass.get(0)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user