Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Flatten nested optionals resulting from try? and optional sub-expressions #16942
This PR implements the flattening of a double-optional type produced from code like
rudkx left a comment
This change would benefit from additional test cases.
For example, what happens with something like:
With the new semantics I would expect this to fail type checking, hopefully with a good diagnostic.
It's possible we already have some interesting test cases along these lines, but they are in files not currently compiled with
@bjhomer It looks like this broke the foundation build: https://ci.swift.org/job/swift-PR-Linux-smoke-test/11232/consoleFull#-1189064102373bf607-d277-47c6-812e-27acc852624c