JS: fixed subSequence in CharSequence descendants (KT-14035) + added support for function intrics in delegation
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user