swift
0d3a4b44 - [Concurrency] if let value on async value should be banned (not crash)

Commit
1 year ago
[Concurrency] if let value on async value should be banned (not crash) The issue is that the shorthand if let syntax injects an implicit expression: https://github.com/apple/swift/pull/40694/ in ParseStmt and that the 'diagnoseUnhandledAsyncSite' explicitly avoids reporting errors in implicit expressions. This change is that we don't mark the implicit declref code emitted by the `if let prop` as implicit anymore, and this way the reporting works out as expected. Added some tests covering this as well as properly erroring out for the nonexistent syntax of shortand + awaiting which doesn't exist, and we properly error on it. Resolves rdar://126169564
Author
Committer
Parents
Loading