JS: tests for KT-7357: extension functions from external KJS library couldn't be called in some cases

This commit is contained in:
Michael Nedzelsky
2015-04-09 13:06:15 +03:00
parent 66aa15f470
commit 6842c98285
8 changed files with 73 additions and 2 deletions
@@ -3,6 +3,7 @@ package sample
import kotlin.Pair
import kotlin.browser.document
import library.sample.*
import kotlin.js.Date
fun myApp() {
val element = document.getElementById("foo")
@@ -11,6 +12,7 @@ fun myApp() {
val x = pairAdd(p)
val y = pairMul(p)
val z = IntHolder(100).value
element.appendChild(document.createTextNode("x=$x y=$y z=$z")!!)
val u = Date().extFun()
element.appendChild(document.createTextNode("x=$x y=$y z=$z u=$u")!!)
}
}