New J2K: Fix existing test data
This commit is contained in:
committed by
Ilya Kirillov
parent
5236858c20
commit
f752796408
@@ -0,0 +1,7 @@
|
||||
import javax.swing.SwingUtilities
|
||||
|
||||
class A {
|
||||
internal fun foo() {
|
||||
SwingUtilities.invokeLater { println("a") }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import javaApi.JavaClass
|
||||
import kotlinApi.KotlinClass
|
||||
|
||||
internal class X {
|
||||
operator fun get(index: Int): Int {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
internal class C {
|
||||
fun foo(map: HashMap<String?, String?>): String? {
|
||||
return map["a"]
|
||||
}
|
||||
|
||||
fun foo(x: X): Int {
|
||||
return x[0]
|
||||
}
|
||||
|
||||
fun foo(kotlinClass: KotlinClass): Int {
|
||||
return kotlinClass.get(0) // not operator!
|
||||
}
|
||||
|
||||
fun foo(javaClass: JavaClass): Int {
|
||||
return javaClass.get(0)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
internal class C {
|
||||
fun foo(o: Any?) {
|
||||
if (o !is String) return
|
||||
println("String")
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
object C {
|
||||
fun consume1(c: C?) {}
|
||||
|
||||
fun consume2(c: C?) {}
|
||||
|
||||
fun foo(cList: List<C?>) {
|
||||
val iter: Iterator<*> = cList.iterator()
|
||||
while (iter.hasNext()) {
|
||||
val c = iter.next() as C?
|
||||
consume1(c)
|
||||
consume2(c)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user