JS: fix inlining of array constructor expressed via typealias
See KT-20978
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user