JS: fix inlining of array constructor expressed via typealias

See KT-20978
This commit is contained in:
Alexey Andreev
2017-10-30 15:58:01 +03:00
parent ec53f9b254
commit 779af375a7
2 changed files with 18 additions and 2 deletions
@@ -1,3 +1,5 @@
typealias ArrayS = Array<String>
fun testArray() {
Array<String>(5) { i ->
if (i == 3) return
@@ -6,6 +8,14 @@ fun testArray() {
throw AssertionError()
}
fun testArrayAlias() {
ArrayS(5) { i ->
if (i == 3) return
i.toString()
}
throw AssertionError()
}
fun testIntArray() {
IntArray(5) { i ->
if (i == 3) return
@@ -56,6 +66,7 @@ fun testDoubleArray() {
fun box(): String {
testArray()
testArrayAlias()
testIntArray()
testLongArray()
testBooleanArray()