Skip to content

Commit 4b91f91

Browse files
AnthonyLatsishborla
authored andcommitted
Add regression test to close swiftlang#43503
1 parent ca81a14 commit 4b91f91

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/Constraints/array_literal.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,13 @@ func defaultToAny(i: Int, s: String) {
145145
let _: [Any] = [1, "a", 3.5]
146146
let _: [Any] = [1, "a", [3.5, 3.7, 3.9]]
147147
let _: [Any] = [1, "a", [3.5, "b", 3]]
148+
let _: [Any] = [1, [2, [3]]]
148149

149150
let _: [Any?] = [1, "a", nil, 3.5]
150151
let _: [Any?] = [1, "a", nil, [3.5, 3.7, 3.9]]
151152
let _: [Any?] = [1, "a", nil, [3.5, "b", nil]]
153+
let _: [Any?] = [1, [2, [3]]]
154+
let _: [Any?] = [1, nil, [2, nil, [3]]]
152155

153156
let a6 = [B(), C()]
154157
let _: Int = a6 // expected-error{{value of type '[A]'}}

0 commit comments

Comments
 (0)