[SR-10279] Generic auto type incorrect for Optional #52679
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 5.0
type checker
Area → compiler: Semantic analysis
Environment
Apple Swift version 5.0 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
Target: x86_64-apple-darwin18.2.0
Xcode Version 10.2 (10E125)
macOS 10.14.3 (18D109)
Additional Detail from JIRA
md5: 18f9cb2a2ea627454dac0fb32ecf18d9
Issue Description:
In swift 4.2 printed "OneService" and return Optional<OneService>.
In swift 5.0 bug - printed "Optional<OneService>" and return Optional<Optional<OneService>> and success converted to Optional<OneService>.
Why ServiceType in swift 5 is Optional<OneService>, return type is Optional<Optional<OneService>>, this is BUG?
The text was updated successfully, but these errors were encountered: