JS: fix some bugs:

1. Fix translation of FQN in inline lambdas
2. Fix StringBuilder.length
3. Workaround order of declaration of names for imported declarations
This commit is contained in:
Alexey Andreev
2016-10-21 18:45:13 +03:00
parent fd158a6922
commit 8eca8efae5
4 changed files with 37 additions and 71 deletions
+3 -3
View File
@@ -30,7 +30,8 @@ class StringBuilder(content: String = "") : Appendable, CharSequence {
private var string: String = content
override val length: Int = string.length
override val length: Int
get() = string.asDynamic().length
override fun get(index: Int): Char = string[index]
@@ -57,8 +58,7 @@ class StringBuilder(content: String = "") : Appendable, CharSequence {
}
fun reverse(): StringBuilder {
val nativeString: dynamic = string
string = nativeString.split("").reverse().join("")
string = string.asDynamic().split("").reverse().join("")
return this
}