Commit Graph

5 Commits

Author SHA1 Message Date
Pavel Yaskevich
cab0cb52ab [CSSyntaxElement] Detect type variables in sequence expressions of for-in loops
Invalid syntax could introduce type variables into sequence which
have to be brought into scope otherwise solver is going to crash.

Resolves: rdar://100753270
2022-11-15 11:56:36 -08:00
Pavel Yaskevich
f5f94fd8ee [CSClosure] Introduce SyntacticElementContext
Replace `AnyFunctionRef` as "context" for syntactic element with
a custom `SyntacticElementContext` to support type-checking of
other constructs in the future.
2022-11-14 20:03:42 +00:00
Hamish Knight
1846276a13 [CS] Factor out brace element handling in a couple of cases
Split out brace element handling for a couple of
walkers into a new function. The diff for this is
best viewed without whitespace changes. This
should be NFC.
2022-11-14 20:03:41 +00:00
Hamish Knight
0faa0b60d4 [CS] NFC: Remove unused method 2022-11-14 20:03:40 +00:00
Hamish Knight
fd9fa72f0f [CS] NFC: Rename CSClosure.cpp -> CSSyntacticElement.cpp
We want to generalize this conjunction logic to
not just be applicable to closures, so rename the
file to match.
2022-11-14 20:03:39 +00:00