JS: introduce new flat JS declaration structure

This commit is contained in:
Alexey Andreev
2016-10-03 17:37:58 +03:00
parent f1ae9949fe
commit f9a392fdec
42 changed files with 1428 additions and 933 deletions
@@ -0,0 +1,10 @@
class A
class B {
val A.x: String
get() = "OK"
fun result(a: A) = a.x
}
fun box() = B().result(A())
@@ -0,0 +1,9 @@
interface I {
fun foo() = "OK"
}
abstract class A : I
class B : A()
fun box() = B().foo()
@@ -0,0 +1,7 @@
interface I {
fun foo() = "OK"
}
class A : I
fun box() = A().foo()
@@ -0,0 +1,9 @@
interface I {
fun foo() = "OK"
}
interface J : I
class A : J
fun box() = A().foo()
@@ -0,0 +1,8 @@
interface I {
val foo: String
get() = "OK"
}
class A : I
fun box() = A().foo
@@ -20,7 +20,7 @@ fun box(): String {
if (foo + bar != OK) return "$foo + $bar != $OK"
val actualAsString = funToString("actual_0")
val expectedAsString = funToString("expected_0")
val expectedAsString = funToString("expected_0").replace("expected", "actual")
if (actualAsString != expectedAsString) return "$actualAsString != $expectedAsString"
if (actual("asd", "12345") != "asd12345") return "${actual("asd", "12345")} != \"asd12345\""