Remove the DeclContext parameter from ResolveMacroRequest, we can now
retrieve the DeclContext either from the CustomAttr or macro expansion
expr/decl directly.
This means we now either produce a bare ErrorType, or an ErrorType
with a generic parameter original type for a generic parameter hole.
We ought to further consolidate this logic by sinking the generic
parameter original type replacement into `simplifyType` itself, but
I'm leaving that for a future patch since it affects completion
results and I want to try keep this close to NFC.
The `_Concurrency` and `_StringProcessing` modules are implementation details of the standard library; to developers, their contents should behave as though they are declared directly within module `Swift`. This is the exact same behavior we expect of cross-import overlays, so treat these modules as though they are cross-import overlays with no bystanding module.
Because these modules don’t re-export the standard library, it’s also necessary to treat `Swift` as a separately imported overlay of itself; do so and make that actually work.
I missed this in my previous patch that moved extension binding until
after we've mutated the AST for IDE inspection, this ad-hoc extension
binding logic is no longer necessary.
This generalization enables curried functions with generic parameters coming from the initial declaration to be printed with the archetype's upperbound rather than '_' unresolved type.
As an added benefit, T.self and T.Type for generic parameters now get shown as the upperbound of the generic parameter provided
We set an original expression on ErrorExpr for cases where we have
something semantically invalid that doesn't fit into the AST, but is
still something that the user has explicitly written. For example
this is how we represent unresolved dots without member names (`x.`).
We still want to type-check the underlying expression though since
it can provide useful diagnostics and allows semantic functionality
such as completion and cursor info to work correctly.
rdar://130771574
[IDE] Move primitive completion function label into CodeCompletionStringBuilder
[IDE] NFC: Remove unneeded string builder methods on CodeCompletionResultBuilder
[IDE] Move addValueBaseName into CodeCompletionStringBuilder
[IDE] Make CodeCompletionResultBuilder a CodeCompletionStringBuilder
[IDE] Explicitly pass DeclContext in CodeCompletionStringBuilder
[IDE] Reduce includes in CodeCompletionStringBuilder.h
This is unnecessary since the local conformances for a protocol
can only contain self-conformances, which we don't want to visit
anyway. This can just be a straightforward loop over the local
conformances.
The extension may have requirements stating new conformance requirements
that aren't present in the underlying substitution map for the
conforming type.
rdar://152164768