There were some changes to completion results because AST mutations that were
made while diagnosing are no longer happening.
This patch 1) changes expression type checking to allow unresolved types when
solving constraint systems, so we get a solution and apply its types in more
cases, and 2) fixes a parsing issue where we would drop a ternary expression
completely if the code completion point was in its true branch.
We were losing the CurLocalContext state (set when entering the closure's
BraceStmt) through the delaying process, sometimes causing errors when we
got back to parsing a delayed decl.
Resolves rdar://problem/54219186
When completing in the only expression of closure, use the return type
of the closure as the type context for the code-completion. However,
since code-completion may be on an incomplete input, we only use the
return type to improve the quality of the result, not to mark it
invalid, since (a) we may add another statement afterwards, or (b) if
the context type is Void it doesn't need to match the value.
Type may depend on its suffix. Parsing complete expression including its
suffix improves context type info around the CC token.
rdar://problem/44143964
When the scope depth is wrong and we add a name to the hash table we
will skip the redefinition checks and end up hitting an assertion
failure.
rdar://problem/22344218
Swift SVN r31690
Most tests were using %swift or similar substitutions, which did not
include the target triple and SDK. The driver was defaulting to the
host OS. Thus, we could not run the tests when the standard library was
not built for OS X.
Swift SVN r24504
Completely disable the AST transformation for single-expression closures. When
this transformation picks up an incomplete expression, the resulting AST is
almost guaranteed to have type mismatches, and the type checker just marks
everything with error types.
rdar://17193319 rdar://17086137
Swift SVN r20153