Commit Graph

5 Commits

Author SHA1 Message Date
Mathew Polzin
a974aaaabc Added test that Optional.none is correctly cast in a generic context. 2019-02-11 09:02:06 -08:00
Mike Ash
0dae9b3dc0 [Runtime] Have swift_dynamicCast unwrap multiple levels of optionals in the source.
The real work is done in checkDynamicCastFromOptional. This code tried to unwrap the source and returned the payload on success. It only did this once, so a type like Optional<Optional<Int>> would come out as Optional<Int> and then a cast to Int would fail.

This change makes checkDynamicCastFromOptional recursive, which makes it unwrap as many levels of Optional as it encounters.

Fixes rdar://problem/40171034 and SR-7664.
2018-05-22 15:05:09 -04:00
practicalswift
8c2b87bce0 [gardening] Add correct copyright notices 2017-01-07 20:32:18 +01:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Max Moiseev
9fc37efee4 [test] renaming test/1_stdlib to just test/stdlib 2016-09-01 16:51:43 -07:00