Update test to support js-backend

This commit is contained in:
Mikhael Bogdanov
2017-07-04 10:12:42 +02:00
parent 8666b95dd2
commit 8121c1d3c4
@@ -1,28 +1,22 @@
// FILE: 1.kt // FILE: 1.kt
//WITH_RUNTIME //WITH_RUNTIME
// IGNORE_BACKEND: JS, NATIVE
package test package test
class SceneContainer2() { class SceneContainer2() {
inline fun <reified T : CharSequence> pushTo(vararg injects: Any, time: A = 0.seconds, transition: B = b) = pushTo(T::class.java, *injects, time = time, transition = transition)
fun <T : CharSequence> pushTo(clazz: Class<T>, vararg injects: Any, time: A = 0.seconds, transition: B = b): T { inline fun pushTo(time: Long = 0.seconds, transition: String = "TR"): String {
return "OK" as T return "OK"
} }
} }
class B inline val Number.seconds: Long get() = this.toLong()
val b = B()
data class A(val x: Int)
inline val Number.seconds: A get() = A(toInt())
// FILE: 2.kt // FILE: 2.kt
import test.* import test.*
fun box(): String { fun box(): String {
return SceneContainer2().pushTo<String>(time = 0.2.seconds) return SceneContainer2().pushTo(time = 0.2.seconds)
} }