JS: create new common directory for all generated tests, migrate several tests there

This commit is contained in:
Alexey Andreev
2016-08-26 16:44:48 +03:00
parent 34a57f863b
commit 2bf0199959
321 changed files with 2123 additions and 2001 deletions
@@ -0,0 +1,51 @@
package foo
open class A(private val x: String) {
fun foo(): String {
class B : A("fail1: simple nested") {
fun bar() = x
}
return B().bar()
}
}
open class A1(private val x: String) {
fun foo(): String {
class B1 {
fun bar(): String {
class C1 : A1("fail2: deeply nested") {
fun baz() = x
}
return C1().baz()
}
}
return B1().bar()
}
}
open class A2(private val x: String) {
fun foo(): String {
class B2 : A2("fail3: deeply nested") {
fun bar(): String {
class C2 {
fun baz() = x
}
return C2().baz()
}
}
return B2().bar()
}
}
fun box(): String {
val result = A("OK").foo()
if (result != "OK") return result
val result1 = A1("OK").foo()
if (result1 != "OK") return result1
val result2 = A2("OK").foo()
if (result2 != "OK") return result2
return "OK"
}