Avatar
To mitigate this source compatibility problem in Swift 5, throw statements will be treated as always throwing any Error. In Swift 6, they will be treated as throwing the type of their thrown expression. One can enable the Swift 6 behavior with the upcoming feature flag named FullTypedThrows.
10:12 AM
5から使えるけど、throw FooError()の推論が、下位互換を失う挙動に変わるのが、そのフラグ,という事だと思う