You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CodeCompletion] Avoid prechecking twice when typeCheckForCodeCompletion is given a non-applicable expression (NFC)
For code completion within a multi-statement closure, typeCheckExpression will
be called on the expression containing the closure, and potentially again on
the expression within the closure body that contains the completion location.
In the first call, the typeCheckForCodeCompletion pre-checks the expression as
part of determining whether a second call is going to be made (in which case
the first is not applicable for completion purposes) or not. In the case where
it's not applicable control is returned to the regular typeCheckExpression
code path, which would then precheck the expression again.
This just moves the precheck before the call out to typeCheckForCodeCompletion
so we avoid prechecking twice unecessarily.
0 commit comments