Minor in JS backend: added regression tests.

#{KT-2219, KT-2470, KT-2507, KT-2222, KT-2995, KT-2221} Obsolete
This commit is contained in:
Zalim Bashorov
2014-03-13 21:40:29 +04:00
parent 604e062f91
commit 7b503bbe6f
15 changed files with 182 additions and 36 deletions
@@ -0,0 +1,26 @@
// KT-2219 if function overload overridden function its name doesn't translated correctly
package foo
fun assertEquals(expected: Any, actual: Any) {
if (expected != actual) throw Exception("expected = $expected, actual = $actual")
}
trait I {
fun test(): String
}
class P : I {
override fun test(): String = "foo" + test("bar")
private fun test(p: String) = p
fun test(s: String, i: Int) = "$i $s"
}
fun box(): String {
assertEquals("foobar", P().test())
assertEquals("35 baz", P().test("baz", 35))
return "OK"
}