mirror of
https://github.com/apple/swift.git
synced 2026-02-27 18:26:24 +01:00
`PreCheckFunctionBuilderRequest` applies `PreCheckExpression` to the expressions inside the function body. Previously it used to receive only `AnyFunctionRef` (`FunctionDecl` or `ClosureExpr`) as the parameter. However, when fast-completion kicks-in, it replaces the body of the function, then tries to call `PreCheckFunctionBuilderRequest` again, with the same function decl as before. It used to return cached "Success" result, but it didn't actually apply `PreCheckExpression`. So any `UnresolvedDeclRefExpr` remained unresolved. In this patch, make `PreCheckFunctionBuilderRequest` receive "body" of the function as well, so it doesn't return the cached result for the *previous* body. rdar://problem/65692922
1.1 KiB
1.1 KiB