Revert "Sema: Emit diagnostics when walking into collection literals with defaulted types"

This reverts commit f608802cfe.
This commit is contained in:
Anthony Latsis
2023-04-20 18:55:03 +03:00
parent c1d5118c21
commit f76f6acbf0
11 changed files with 35 additions and 85 deletions

View File

@@ -328,8 +328,6 @@ do {
while case let _ as [Derived] = arr {}
// expected-warning@-1 {{'let' pattern has no effect; sub-pattern didn't bind any variables}}
// FIXME: https://github.com/apple/swift/issues/61850
// expected-warning@+1 {{heterogeneous collection literal could only be inferred to '[[Base]]'; add explicit type annotation if this is intentional}}
for case _ as [Derived] in [arr] {}
if case is [Derived] = arr {}