New J2K: Fix existing test data

This commit is contained in:
Ilya Kirillov
2018-12-01 15:55:37 +03:00
committed by Ilya Kirillov
parent 5236858c20
commit f752796408
330 changed files with 2800 additions and 60 deletions
@@ -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")
}
}
@@ -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)
}
}
}