mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Compute code completion type relation when wrapping a ContextFreeCodeCompletionResult in a CodeCompletionResult
[CodeCompletion] Make ExpectedTypeContext a class with explicit getters/setters This simplifies debugging because you can break when the possible types are set and you can also search for references to `setPossibleType` to figure out where the expected types are being set.
This commit is contained in:
@@ -923,14 +923,15 @@ static void transformAndForwardResults(
|
||||
new (innerSink.allocator) ContextFreeCodeCompletionResult(
|
||||
CodeCompletionResultKind::BuiltinOperator, completionString,
|
||||
CodeCompletionOperatorKind::None,
|
||||
/*BriefDocComment=*/"", ContextFreeNotRecommendedReason::None,
|
||||
/*BriefDocComment=*/"", CodeCompletionResultType::notApplicable(),
|
||||
ContextFreeNotRecommendedReason::None,
|
||||
CodeCompletionDiagnosticSeverity::None,
|
||||
/*DiagnosticMessage=*/"");
|
||||
auto *paren = new (innerSink.allocator) CodeCompletion::SwiftResult(
|
||||
*contextFreeResult, SemanticContextKind::CurrentNominal,
|
||||
CodeCompletionFlairBit::ExpressionSpecific,
|
||||
exactMatch ? exactMatch->getNumBytesToErase() : 0,
|
||||
CodeCompletionResultTypeRelation::NotApplicable,
|
||||
/*TypeContext=*/nullptr, /*DC=*/nullptr,
|
||||
ContextualNotRecommendedReason::None,
|
||||
CodeCompletionDiagnosticSeverity::None, /*DiagnosticMessage=*/"");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user