Commit Graph

8 Commits

Author SHA1 Message Date
Pavel Yaskevich
d461eab3f0 [TypeChecker] Effects: Don't diagnose implicit AST nodes
Implicitly generated code requires checking but it doesn't have
to produce a diagnostic into the void.
2022-05-30 23:17:41 -07:00
Evan Wilde
3321c32456 Pass all the tests!
There were some tests that relied on the top-level code not being an
asynchronous context to emit certain error messages. Now that it is,
those tests weren't emitting the expected error message.

In other cases, the issue was that they were trying to initialize a
global variable and weren't really using top-level code as top-level
code, so adding `-parse-as-library` was sufficient for the testing
purposes.

To fix the objc_async test, parsing as a library was nearly sufficient.
Unfortunately, the little `if #available` trick that I was using stopped
working since it relied on being in top-level code. So that we emit the
unavailableFromAsync error message, I had to set the availability on
everything correctly because we can't just disable availability
checking.
2022-03-15 16:35:48 -07:00
Doug Gregor
eeeea49764 Remove -enable-experimental-concurrency almost everywhere. 2021-07-26 21:24:43 -07:00
Doug Gregor
1e2012d816 Disable availability checking in tests that use concurrency 2021-07-20 12:46:26 -07:00
Doug Gregor
06dc77ddf3 Revert "[Concurrency] Resyntax 'async let' as 'spawn let'."
This reverts commit 41f42fabbf.
2021-05-06 22:18:36 -07:00
Doug Gregor
41f42fabbf [Concurrency] Resyntax 'async let' as 'spawn let'.
This helps track the proposal.
2021-04-29 23:28:16 -07:00
Kavon Farvardin
74eb1a7ae6 allow property/subscript access expressions for actors in typechecker
We now mark some DeclRefExpr and LookupExprs as implicitly async
during typechecking, depending on whether they appear in a context
that is only performing a read / get operation, and whether they
are cross-actor operations.

also resolves rdar://72403401 by improving the error messages
(no more vague "'await' in async context" when its clearly a call!)
2021-03-04 18:37:32 -08:00
Doug Gregor
dd7ce8015d [Concurrency] Reject top-level asynchronous code for now.
We haven't implemented any support for top-level async code yet, so
reject it in effects checking rather than crashing in the SIL verifier.
Fixes rdar://71512818.
2020-12-03 22:28:58 -08:00