JS: fix remaining tests. Suppress extensionFromTopLevelUnitOneStringArg.kt, use another approach to check whether object's property accessed via this
This commit is contained in:
Vendored
+6
-1
@@ -20,7 +20,12 @@ fun box(): String {
|
||||
|
||||
if (a.result != "OK") return a.result
|
||||
|
||||
// TODO: uncomment when KT-13312 gets fixed
|
||||
/*
|
||||
val a1 = A()
|
||||
run(a1, "OK", A::foo)
|
||||
return a.result
|
||||
if (a1.result != "OK) return a1.result
|
||||
*/
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
+2
-7
@@ -1,18 +1,13 @@
|
||||
// ONLY_THIS_QUALIFIED_REFERENCES: foo_qltb3l$
|
||||
|
||||
package foo
|
||||
|
||||
object A {
|
||||
private val foo = 23
|
||||
|
||||
fun bar(): Int {
|
||||
// Erase object so that we ensure that access to 'foo' property is performed via 'this'
|
||||
// It's no crucial from runtime standpoind, but JS code looks more concise and natural this way.
|
||||
erase()
|
||||
return foo
|
||||
}
|
||||
|
||||
fun erase() {
|
||||
js("_.foo.A = null")
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
Reference in New Issue
Block a user