[SR-10183] Swift 5 Regression: Bad Optional Resolution/Inference #52585
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
Xcode 10.2 / Swift 5
Additional Detail from JIRA
md5: 728bd925e2c7fdb822abcee069cd6283
Issue Description:
Swift 5 required this explicit typing:
pointfreeco/pointfreeco@1982a9a
The full code:
Without the explicit
EitherIO<Error, Models.Subscription>
hint, Swift 5 started thinking this was anOptional<EitherIO<Error, Models.Subscription>>
.While the code is opaque, the code base is fully open source and you can check it out and see for yourself!
The previous commit, which will fail due to the type being incorrectly inferred as optional:
pointfreeco/pointfreeco@c5d1297
The text was updated successfully, but these errors were encountered: