JS/RTTI: fix cast to Any

This commit is contained in:
Alexey Tsvetkov
2015-06-16 22:13:42 +03:00
committed by Alexey Andreev
parent 2b3ebc7e9f
commit 38b0effe15
7 changed files with 58 additions and 7 deletions
@@ -0,0 +1,12 @@
package foo
fun box(): String {
val x = 0
val y = 1
val z = 2
val xs = arrayListOf(z, y, x)
xs.remove(x as Any)
assertEquals(listOf(z, y), xs)
return "OK"
}
+6
View File
@@ -555,6 +555,12 @@ var Kotlin = {};
}
};
Kotlin.isAny = function () {
return function (object) {
return object != null;
}
};
Kotlin.kotlinModuleMetadata = function (abiVersion, moduleName, data) {
};