add tests for private signatures

regenerate tests

add test for EnumEntry's argument declarations

add another test

regenerate test

fix test a bit
This commit is contained in:
Roman Artemev
2021-05-13 17:05:18 +03:00
committed by TeamCityServer
parent 2865d8bd45
commit 5a284de2d4
15 changed files with 665 additions and 0 deletions
@@ -0,0 +1,52 @@
// TARGET_BACKEND: JS
// MODULE: lib
// FILE: l.kt
var result = ""
fun foo(b: Boolean) {
class P1
abstract class A1 {
fun bar(p1: P1): String = "AB"
abstract fun qux(): String
}
if (b) {
class C1 : A1() {
override fun qux(): String = "C1T"
}
val c1 = C1()
result += c1.qux()
result += c1.bar(P1())
} else {
class C1 : A1() {
override fun qux(): String = "C1F"
}
val c1 = C1()
result += c1.qux()
result += c1.bar(P1())
}
}
fun r(): String = result
// MODULE: main(lib)
// FILE: m.kt
fun box(): String {
foo(true)
foo(false)
val rr = r()
if (rr != "C1TABC1FAB") return "FAIL: $rr"
return "OK"
}