JS: fixed subSequence in CharSequence descendants (KT-14035) + added support for function intrics in delegation

This commit is contained in:
Anton Bannykh
2017-01-20 14:06:06 +03:00
parent 4fe040eeb9
commit 847ec9e550
5 changed files with 60 additions and 3 deletions
+11 -1
View File
@@ -36,4 +36,14 @@ internal fun arrayIterator(array: dynamic): MutableIterator<dynamic> {
internal class PropertyMetadata(@JsName("callableName") val name: String)
@JsName("noWhenBranchMatched")
internal fun noWhenBranchMatched(): Nothing = throw NoWhenBranchMatchedException()
internal fun noWhenBranchMatched(): Nothing = throw NoWhenBranchMatchedException()
@JsName("subSequence")
fun subSequence(c: CharSequence, startIndex: Int, endIndex: Int): CharSequence {
if (c is String) {
return c.substring(startIndex, endIndex)
}
else {
return c.asDynamic().`subSequence_vux9f0$`(startIndex, endIndex)
}
}