"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/Parse/matching_patterns.swift" between
swift-swift-5.8-RELEASE.tar.gz and swift-swift-5.8.1-RELEASE.tar.gz

About: Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns (developed by Apple).

matching_patterns.swift  (swift-swift-5.8-RELEASE):matching_patterns.swift  (swift-swift-5.8.1-RELEASE)
skipping to change at line 303 skipping to change at line 303
let arr: [Base] let arr: [Base]
if case let _ as [Derived] = arr {} if case let _ as [Derived] = arr {}
// expected-warning@-1 {{'let' pattern has no effect; sub-pattern didn't bind any variables}} // expected-warning@-1 {{'let' pattern has no effect; sub-pattern didn't bind any variables}}
guard case let _ as [Derived] = arr else {} guard case let _ as [Derived] = arr else {}
// expected-warning@-1 {{'let' pattern has no effect; sub-pattern didn't bind any variables}} // expected-warning@-1 {{'let' pattern has no effect; sub-pattern didn't bind any variables}}
while case let _ as [Derived] = arr {} while case let _ as [Derived] = arr {}
// expected-warning@-1 {{'let' pattern has no effect; sub-pattern didn't bind any variables}} // 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 inferr
ed to '[[Base]]'; add explicit type annotation if this is intentional}}
for case _ as [Derived] in [arr] {} for case _ as [Derived] in [arr] {}
if case is [Derived] = arr {} if case is [Derived] = arr {}
guard case is [Derived] = arr else {} guard case is [Derived] = arr else {}
while case is [Derived] = arr {} while case is [Derived] = arr {}
for case is [Derived] in [arr] {} for case is [Derived] in [arr] {}
 End of changes. 1 change blocks. 
3 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)