JS: create new common directory for all generated tests, migrate several tests there
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package foo
|
||||
|
||||
object A {
|
||||
val a = 1
|
||||
fun foo() = 31
|
||||
|
||||
val f = { a + foo() }
|
||||
}
|
||||
|
||||
class B {
|
||||
companion object {
|
||||
val a = 21
|
||||
fun foo() = 3
|
||||
|
||||
val f = { this.a + this.foo() }
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a = A.f()
|
||||
if (a != 32) return "a != 32, a = $a"
|
||||
|
||||
val b = B.f()
|
||||
if (b != 24) return "b != 24, b = $b"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user