Skip to content

Commit c3c5fbc

Browse files
authored
Merge pull request #30004 from rintaro/ide-completion-genericreq-rdar58580482
[CodeCompletion] Re-implement generic requirement completion
2 parents 0fb4ea1 + fc28f90 commit c3c5fbc

File tree

6 files changed

+189
-33
lines changed

6 files changed

+189
-33
lines changed

include/swift/IDE/CodeCompletion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ enum class CompletionKind {
507507
AfterPoundDirective,
508508
PlatformConditon,
509509
AfterIfStmtElse,
510-
GenericParams,
510+
GenericRequirement,
511511
PrecedenceGroup,
512512
};
513513

include/swift/Parse/CodeCompletionCallbacks.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ class CodeCompletionCallbacks {
217217

218218
virtual void completeAfterIfStmt(bool hasElse) {};
219219

220-
virtual void completeGenericParams(TypeLoc TL) {};
220+
virtual void completeGenericRequirement() {};
221221

222222
/// Signals that the AST for the all the delayed-parsed code was
223223
/// constructed. No \c complete*() callbacks will be done after this.

lib/IDE/CodeCompletion.cpp

Lines changed: 65 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ class CodeCompletionCallbacksImpl : public CodeCompletionCallbacks {
13751375
Optional<StmtKind> ParentKind) override;
13761376
void completeAfterPoundDirective() override;
13771377
void completePlatformCondition() override;
1378-
void completeGenericParams(TypeLoc TL) override;
1378+
void completeGenericRequirement() override;
13791379
void completeAfterIfStmt(bool hasElse) override;
13801380

13811381
void doneParsing() override;
@@ -1463,7 +1463,8 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
14631463
EnumElement,
14641464
Type,
14651465
TypeInDeclContext,
1466-
ImportFromModule
1466+
ImportFromModule,
1467+
GenericRequirement,
14671468
};
14681469

14691470
LookupKind Kind;
@@ -1565,6 +1566,25 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
15651566
return false;
15661567
}
15671568

1569+
/// Returns \c true if \p TAD is usable as a first type of a requirement in
1570+
/// \c where clause for a context.
1571+
/// \p selfTy must be a \c Self type of the context.
1572+
static bool canBeUsedAsRequirementFirstType(Type selfTy, TypeAliasDecl *TAD) {
1573+
auto T = TAD->getDeclaredInterfaceType();
1574+
auto subMap = selfTy->getMemberSubstitutionMap(TAD->getParentModule(), TAD);
1575+
T = T.subst(subMap)->getCanonicalType();
1576+
1577+
ArchetypeType *archeTy = T->getAs<ArchetypeType>();
1578+
if (!archeTy)
1579+
return false;
1580+
archeTy = archeTy->getRoot();
1581+
1582+
// For protocol, the 'archeTy' should match with the 'baseTy' which is the
1583+
// dynamic 'Self' type of the protocol. For nominal decls, 'archTy' should
1584+
// be one of the generic params in 'selfTy'. Search 'archeTy' in 'baseTy'.
1585+
return selfTy.findIf([&](Type T) { return archeTy->isEqual(T); });
1586+
}
1587+
15681588
public:
15691589
struct RequestedResultsTy {
15701590
const ModuleDecl *TheModule;
@@ -2513,6 +2533,7 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
25132533
case LookupKind::EnumElement:
25142534
case LookupKind::Type:
25152535
case LookupKind::TypeInDeclContext:
2536+
case LookupKind::GenericRequirement:
25162537
llvm_unreachable("cannot have a method call while doing a "
25172538
"type completion");
25182539
case LookupKind::ImportFromModule:
@@ -3151,13 +3172,19 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
31513172
return;
31523173
}
31533174

3154-
if (auto *TAD = dyn_cast<TypeAliasDecl>(D)) {
3155-
addTypeAliasRef(TAD, Reason, dynamicLookupInfo);
3175+
if (auto *GP = dyn_cast<GenericTypeParamDecl>(D)) {
3176+
addGenericTypeParamRef(GP, Reason, dynamicLookupInfo);
31563177
return;
31573178
}
31583179

3159-
if (auto *GP = dyn_cast<GenericTypeParamDecl>(D)) {
3160-
addGenericTypeParamRef(GP, Reason, dynamicLookupInfo);
3180+
LLVM_FALLTHROUGH;
3181+
case LookupKind::GenericRequirement:
3182+
3183+
if (TypeAliasDecl *TAD = dyn_cast<TypeAliasDecl>(D)) {
3184+
if (Kind == LookupKind::GenericRequirement &&
3185+
!canBeUsedAsRequirementFirstType(BaseType, TAD))
3186+
return;
3187+
addTypeAliasRef(TAD, Reason, dynamicLookupInfo);
31613188
return;
31623189
}
31633190

@@ -3922,6 +3949,33 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
39223949
}
39233950
}
39243951

3952+
void getGenericRequirementCompletions(DeclContext *DC) {
3953+
auto genericSig = DC->getGenericSignatureOfContext();
3954+
if (!genericSig)
3955+
return;
3956+
3957+
for (auto GPT : genericSig->getGenericParams()) {
3958+
addGenericTypeParamRef(GPT->getDecl(),
3959+
DeclVisibilityKind::GenericParameter, {});
3960+
}
3961+
3962+
// For non-protocol nominal type decls, only suggest generic parameters.
3963+
if (auto D = DC->getAsDecl())
3964+
if (isa<NominalTypeDecl>(D) && !isa<ProtocolDecl>(D))
3965+
return;
3966+
3967+
auto typeContext = DC->getInnermostTypeContext();
3968+
if (!typeContext)
3969+
return;
3970+
3971+
auto selfTy = typeContext->getSelfTypeInContext();
3972+
Kind = LookupKind::GenericRequirement;
3973+
this->BaseType = selfTy;
3974+
NeedLeadingDot = false;
3975+
lookupVisibleMemberDecls(*this, MetatypeType::get(selfTy),
3976+
CurrDeclContext, IncludeInstanceMembers);
3977+
}
3978+
39253979
static bool canUseAttributeOnDecl(DeclAttrKind DAK, bool IsInSil,
39263980
Optional<DeclKind> DK) {
39273981
if (DeclAttribute::isUserInaccessible(DAK))
@@ -4831,10 +4885,9 @@ void CodeCompletionCallbacksImpl::completeAfterIfStmt(bool hasElse) {
48314885
}
48324886
}
48334887

4834-
void CodeCompletionCallbacksImpl::completeGenericParams(TypeLoc TL) {
4888+
void CodeCompletionCallbacksImpl::completeGenericRequirement() {
48354889
CurDeclContext = P.CurDeclContext;
4836-
Kind = CompletionKind::GenericParams;
4837-
ParsedTypeLoc = TL;
4890+
Kind = CompletionKind::GenericRequirement;
48384891
}
48394892

48404893
void CodeCompletionCallbacksImpl::completeNominalMemberBeginning(
@@ -4969,7 +5022,7 @@ void CodeCompletionCallbacksImpl::addKeywords(CodeCompletionResultSink &Sink,
49695022
case CompletionKind::AfterPoundExpr:
49705023
case CompletionKind::AfterPoundDirective:
49715024
case CompletionKind::PlatformConditon:
4972-
case CompletionKind::GenericParams:
5025+
case CompletionKind::GenericRequirement:
49735026
case CompletionKind::KeyPathExprObjC:
49745027
case CompletionKind::KeyPathExprSwift:
49755028
case CompletionKind::PrecedenceGroup:
@@ -5559,15 +5612,8 @@ void CodeCompletionCallbacksImpl::doneParsing() {
55595612
break;
55605613
}
55615614

5562-
case CompletionKind::GenericParams:
5563-
if (auto GT = ParsedTypeLoc.getType()->getAnyGeneric()) {
5564-
if (auto Params = GT->getGenericParams()) {
5565-
for (auto GP : Params->getParams()) {
5566-
Lookup.addGenericTypeParamRef(
5567-
GP, DeclVisibilityKind::GenericParameter, {});
5568-
}
5569-
}
5570-
}
5615+
case CompletionKind::GenericRequirement:
5616+
Lookup.getGenericRequirementCompletions(CurDeclContext);
55715617
break;
55725618
case CompletionKind::PrecedenceGroup:
55735619
Lookup.getPrecedenceGroupCompletions(SyntxKind);

lib/Parse/ParseDecl.cpp

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4629,21 +4629,24 @@ Parser::parseDeclExtension(ParseDeclOptions Flags, DeclAttributes &Attributes) {
46294629

46304630
// Parse the optional where-clause.
46314631
TrailingWhereClause *trailingWhereClause = nullptr;
4632+
bool trailingWhereHadCodeCompletion = false;
46324633
if (Tok.is(tok::kw_where)) {
46334634
SourceLoc whereLoc;
46344635
SmallVector<RequirementRepr, 4> requirements;
46354636
bool firstTypeInComplete;
46364637
auto whereStatus = parseGenericWhereClause(whereLoc, requirements,
46374638
firstTypeInComplete);
4639+
if (whereStatus.hasCodeCompletion()) {
4640+
if (isCodeCompletionFirstPass())
4641+
return whereStatus;
4642+
trailingWhereHadCodeCompletion = true;
4643+
}
4644+
46384645
if (whereStatus.isSuccess()) {
46394646
trailingWhereClause = TrailingWhereClause::create(Context, whereLoc,
46404647
requirements);
4641-
} else if (whereStatus.hasCodeCompletion()) {
4642-
if (CodeCompletion && firstTypeInComplete) {
4643-
CodeCompletion->completeGenericParams(extendedType.getPtrOrNull());
4644-
} else
4645-
return makeParserCodeCompletionResult<ExtensionDecl>();
46464648
}
4649+
status |= whereStatus;
46474650
}
46484651

46494652
ExtensionDecl *ext = ExtensionDecl::create(Context, ExtensionLoc,
@@ -4652,6 +4655,8 @@ Parser::parseDeclExtension(ParseDeclOptions Flags, DeclAttributes &Attributes) {
46524655
CurDeclContext,
46534656
trailingWhereClause);
46544657
ext->getAttrs() = Attributes;
4658+
if (trailingWhereHadCodeCompletion && CodeCompletion)
4659+
CodeCompletion->setParsedDecl(ext);
46554660

46564661
SyntaxParsingContext BlockContext(SyntaxContext, SyntaxKind::MemberDeclBlock);
46574662
SourceLoc LBLoc, RBLoc;
@@ -7079,12 +7084,16 @@ parseDeclProtocol(ParseDeclOptions Flags, DeclAttributes &Attributes) {
70797084
}
70807085

70817086
TrailingWhereClause *TrailingWhere = nullptr;
7087+
bool whereClauseHadCodeCompletion = false;
70827088
// Parse a 'where' clause if present.
70837089
if (Tok.is(tok::kw_where)) {
70847090
auto whereStatus = parseProtocolOrAssociatedTypeWhereClause(
70857091
TrailingWhere, /*isProtocol=*/true);
7086-
if (whereStatus.shouldStopParsing())
7087-
return whereStatus;
7092+
if (whereStatus.hasCodeCompletion()) {
7093+
if (isCodeCompletionFirstPass())
7094+
return whereStatus;
7095+
whereClauseHadCodeCompletion = true;
7096+
}
70887097
}
70897098

70907099
ProtocolDecl *Proto = new (Context)
@@ -7093,6 +7102,8 @@ parseDeclProtocol(ParseDeclOptions Flags, DeclAttributes &Attributes) {
70937102
// No need to setLocalDiscriminator: protocols can't appear in local contexts.
70947103

70957104
Proto->getAttrs() = Attributes;
7105+
if (whereClauseHadCodeCompletion && CodeCompletion)
7106+
CodeCompletion->setParsedDecl(Proto);
70967107

70977108
ContextChange CC(*this, Proto);
70987109
Scope ProtocolBodyScope(this, ScopeKind::ProtocolBody);

lib/Parse/ParseGeneric.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,14 @@ ParserStatus Parser::parseGenericWhereClause(
279279
Optional<SyntaxParsingContext> BodyContext;
280280
BodyContext.emplace(SyntaxContext);
281281

282+
if (Tok.is(tok::code_complete)) {
283+
if (CodeCompletion)
284+
CodeCompletion->completeGenericRequirement();
285+
consumeToken(tok::code_complete);
286+
Status.setHasCodeCompletion();
287+
break;
288+
}
289+
282290
// Parse the leading type. It doesn't necessarily have to be just a type
283291
// identifier if we're dealing with a same-type constraint.
284292
ParserResult<TypeRepr> FirstType = parseType();

test/IDE/complete_where_clause.swift

Lines changed: 96 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GP3 | %FileCheck %s -check-prefix=A1
44
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GP4 | %FileCheck %s -check-prefix=TYPE1
55
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GP5 | %FileCheck %s -check-prefix=TYPE1
6-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GP6 | %FileCheck %s -check-prefix=A1
6+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GP6 | %FileCheck %s -check-prefix=EMPTY
77
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_ASSOC_NODUP_1 | %FileCheck %s -check-prefix=GEN_T_ASSOC_E
88
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_ASSOC_NODUP_2 | %FileCheck %s -check-prefix=GEN_T_ASSOC_E
99
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_1 | %FileCheck %s -check-prefix=GEN_T
@@ -21,14 +21,23 @@
2121
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ALIAS_2 | %FileCheck %s -check-prefix=GEN_T_DOT
2222
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_1 | %FileCheck %s -check-prefix=GEN_T_NOMINAL
2323
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_2 | %FileCheck %s -check-prefix=GEN_T_DOT
24-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_3 | %FileCheck %s -check-prefix=GEN_T_NOMINAL
24+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_3 | %FileCheck %s -check-prefix=ANYTYPE
2525
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_4 | %FileCheck %s -check-prefix=GEN_T_DOT
2626
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_1 | %FileCheck %s -check-prefix=GEN_T_NOMINAL
2727
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_2 | %FileCheck %s -check-prefix=GEN_T_DOT
2828
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_1 | %FileCheck %s -check-prefix=GEN_T_NOMINAL
2929
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_2 | %FileCheck %s -check-prefix=GEN_T_DOT
3030
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ASSOC_1 | %FileCheck %s -check-prefix=P2
3131
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ASSOC_2 | %FileCheck %s -check-prefix=U_DOT
32+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTOCOL | %FileCheck %s -check-prefix=PROTOCOL
33+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTOCOL_EXT | %FileCheck %s -check-prefix=PROTOCOL
34+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTOCOL_SELF | %FileCheck %s -check-prefix=PROTOCOL_SELF
35+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NOMINAL_TYPEALIAS | %FileCheck %s -check-prefix=NOMINAL_TYPEALIAS
36+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NOMINAL_TYPEALIAS_EXT | %FileCheck %s -check-prefix=NOMINAL_TYPEALIAS_EXT
37+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NOMINAL_TYPEALIAS_NESTED1 | %FileCheck %s -check-prefix=NOMINAL_TYPEALIAS_NESTED1
38+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NOMINAL_TYPEALIAS_NESTED2 | %FileCheck %s -check-prefix=NOMINAL_TYPEALIAS_NESTED2
39+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NOMINAL_TYPEALIAS_NESTED1_EXT | %FileCheck %s -check-prefix=NOMINAL_TYPEALIAS_NESTED1_EXT
40+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NOMINAL_TYPEALIAS_NESTED2_EXT | %FileCheck %s -check-prefix=NOMINAL_TYPEALIAS_NESTED2_EXT
3241

3342
class A1<T1, T2, T3> {}
3443

@@ -65,6 +74,10 @@ extension A1 where T1.#^GP6^# {}
6574
// TYPE1-NOT: T4
6675
// TYPE1-NOT: T5
6776

77+
// EMPTY: Begin completions, 1 items
78+
// EMPTY-DAG: Keyword/None: Type[#T1.Type#]; name=Type
79+
// EMPTY: End completions
80+
6881
protocol A {associatedtype E}
6982
protocol B {associatedtype E}
7083

@@ -118,20 +131,98 @@ class C1<T> where #^CLASS_1^# {}
118131
class C2<T> where T.#^CLASS_2^# {}
119132
enum E1<T> where #^ENUM_1^# {}
120133
enum E2<T> where T.#^ENUM_2^# {}
134+
// GEN_T_NOMINAL: Begin completions, 1 items
121135
// GEN_T_NOMINAL: Decl[GenericTypeParam]/Local: T[#T#]; name=T
136+
// GEN_T_NOMINAL: End completions
137+
138+
// ANYTYPE: Begin completions
139+
// ANYTYPE-DAG: Decl[GenericTypeParam]/Local: T[#T#];
140+
// ANYTYPE-DAG: Decl[Class]/CurrModule: A1[#A1#];
141+
// ANYTYPE-DAG: Decl[Struct]/OtherModule[Swift]: Int[#Int#];
142+
// ANYTYPE: End completions
122143

123144
protocol P2 {
124145
associatedtype T where #^ASSOC_1^#
125146
associatedtype U: Assoc where U.#^ASSOC_2^#
126147
}
127148

128-
// P2: Begin completions
149+
// P2: Begin completions, 3 items
129150
// P2-DAG: Decl[GenericTypeParam]/Local: Self[#Self#];
130151
// P2-DAG: Decl[AssociatedType]/{{Super|CurrNominal}}: T;
131152
// P2-DAG: Decl[AssociatedType]/{{Super|CurrNominal}}: U;
132153
// P2: End completions
133154

134-
// U_DOT: Begin completions
135-
// FIXME: Should complete Q from Assoc.
155+
// U_DOT: Begin completions, 2 items
136156
// U_DOT-DAG: Keyword/None: Type[#Self.U.Type#];
157+
// U_DOT-DAG: Decl[AssociatedType]/CurrNominal: Q;
137158
// U_DOT: End completions
159+
160+
protocol P3 where #^PROTOCOL^# {
161+
associatedtype T: Assoc
162+
typealias U = T.Q
163+
typealias IntAlias = Int
164+
}
165+
// PROTOCOL: Begin completions, 3 items
166+
// PROTOCOL-DAG: Decl[GenericTypeParam]/Local: Self[#Self#];
167+
// PROTOCOL-DAG: Decl[AssociatedType]/CurrNominal: T;
168+
// PROTOCOL-DAG: Decl[TypeAlias]/CurrNominal: U[#Self.T.Q#];
169+
// PROTOCOL: End completions
170+
171+
extension P3 where #^PROTOCOL_EXT^# {
172+
// Same as PROTOCOL
173+
}
174+
175+
protocol P4 where Self.#^PROTOCOL_SELF^# {
176+
associatedtype T: Assoc
177+
typealias U = T.Q
178+
typealias IntAlias = Int
179+
}
180+
// PROTOCOL_SELF: Begin completions, 4 items
181+
// PROTOCOL_SELF-DAG: Decl[AssociatedType]/CurrNominal: T;
182+
// PROTOCOL_SELF-DAG: Decl[TypeAlias]/CurrNominal: U[#Self.T.Q#];
183+
// PROTOCOL_SELF-DAG: Decl[TypeAlias]/CurrNominal: IntAlias[#Int#];
184+
// PROTOCOL_SELF-DAG: Keyword/None: Type[#Self.Type#];
185+
// PROTOCOL_SELF: End completions
186+
187+
struct TA1<T: Assoc> where #^NOMINAL_TYPEALIAS^# {
188+
typealias U = T.Q
189+
}
190+
// NOMINAL_TYPEALIAS: Begin completions, 1 items
191+
// NOMINAL_TYPEALIAS-DAG: Decl[GenericTypeParam]/Local: T[#T#];
192+
// NOMINAL_TYPEALIAS: End completions
193+
extension TA1 where #^NOMINAL_TYPEALIAS_EXT^# { }
194+
// NOMINAL_TYPEALIAS_EXT: Begin completions, 2 items
195+
// NOMINAL_TYPEALIAS_EXT-DAG: Decl[GenericTypeParam]/Local: T[#T#];
196+
// NOMINAL_TYPEALIAS_EXT-DAG: Decl[TypeAlias]/CurrNominal: U[#T.Q#];
197+
// NOMINAL_TYPEALIAS_EXT: End completions
198+
199+
struct TA2<T: Assoc> {
200+
struct Inner1<U> where #^NOMINAL_TYPEALIAS_NESTED1^# {
201+
typealias X1 = T
202+
typealias X2 = T.Q
203+
}
204+
// NOMINAL_TYPEALIAS_NESTED1: Begin completions, 2 items
205+
// NOMINAL_TYPEALIAS_NESTED1-DAG: Decl[GenericTypeParam]/Local: T[#T#];
206+
// NOMINAL_TYPEALIAS_NESTED1-DAG: Decl[GenericTypeParam]/Local: U[#U#];
207+
// NOMINAL_TYPEALIAS_NESTED1: End completions
208+
struct Inner2 where #^NOMINAL_TYPEALIAS_NESTED2^# {
209+
typealias X1 = T
210+
typealias X2 = T.Q
211+
}
212+
// NOMINAL_TYPEALIAS_NESTED2: Begin completions, 1 items
213+
// NOMINAL_TYPEALIAS_NESTED2-DAG: Decl[GenericTypeParam]/Local: T[#T#];
214+
// NOMINAL_TYPEALIAS_NESTED2: End completions
215+
}
216+
extension TA2.Inner1 where #^NOMINAL_TYPEALIAS_NESTED1_EXT^# {}
217+
// NOMINAL_TYPEALIAS_NESTED1_EXT: Begin completions, 4 items
218+
// NOMINAL_TYPEALIAS_NESTED1_EXT-DAG: Decl[GenericTypeParam]/Local: T[#T#];
219+
// NOMINAL_TYPEALIAS_NESTED1_EXT-DAG: Decl[GenericTypeParam]/Local: U[#U#];
220+
// NOMINAL_TYPEALIAS_NESTED1_EXT-DAG: Decl[TypeAlias]/CurrNominal: X1[#T#];
221+
// NOMINAL_TYPEALIAS_NESTED1_EXT-DAG: Decl[TypeAlias]/CurrNominal: X2[#T.Q#];
222+
// NOMINAL_TYPEALIAS_NESTED1_EXT: End completions
223+
extension TA2.Inner2 where #^NOMINAL_TYPEALIAS_NESTED2_EXT^# {}
224+
// NOMINAL_TYPEALIAS_NESTED2_EXT: Begin completions, 3 items
225+
// NOMINAL_TYPEALIAS_NESTED2_EXT-DAG: Decl[GenericTypeParam]/Local: T[#T#];
226+
// NOMINAL_TYPEALIAS_NESTED2_EXT-DAG: Decl[TypeAlias]/CurrNominal: X1[#T#];
227+
// NOMINAL_TYPEALIAS_NESTED2_EXT-DAG: Decl[TypeAlias]/CurrNominal: X2[#T.Q#];
228+
// NOMINAL_TYPEALIAS_NESTED2_EXT: End completions

0 commit comments

Comments
 (0)