Skip to content

Commit c385fe5

Browse files
committed
[CodeCompletion] Migrate PostfixExprParen to solver-based
1 parent 1e723dd commit c385fe5

12 files changed

+48
-75
lines changed

lib/IDE/CodeCompletion.cpp

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1507,6 +1507,7 @@ bool CodeCompletionCallbacksImpl::trySolverCompletion(bool MaybeFuncBody) {
15071507
Lookup.deliverResults(CurDeclContext, DotLoc, CompletionContext, Consumer);
15081508
return true;
15091509
}
1510+
case CompletionKind::PostfixExprParen:
15101511
case CompletionKind::CallArg: {
15111512
assert(CodeCompleteTokenExpr);
15121513
assert(CurDeclContext);
@@ -1692,6 +1693,7 @@ void CodeCompletionCallbacksImpl::doneParsing(SourceFile *SrcFile) {
16921693
case CompletionKind::AfterPoundExpr:
16931694
case CompletionKind::AccessorBeginning:
16941695
case CompletionKind::CaseStmtBeginning:
1696+
case CompletionKind::PostfixExprParen:
16951697
llvm_unreachable("should be already handled");
16961698
return;
16971699

@@ -1712,45 +1714,6 @@ void CodeCompletionCallbacksImpl::doneParsing(SourceFile *SrcFile) {
17121714
break;
17131715
}
17141716

1715-
case CompletionKind::PostfixExprParen: {
1716-
Lookup.setHaveLParen(true);
1717-
1718-
ExprContextInfo ContextInfo(CurDeclContext, CodeCompleteTokenExpr);
1719-
1720-
if (ShouldCompleteCallPatternAfterParen) {
1721-
ExprContextInfo ParentContextInfo(CurDeclContext, ParsedExpr);
1722-
Lookup.setExpectedTypes(
1723-
ParentContextInfo.getPossibleTypes(),
1724-
ParentContextInfo.isImplicitSingleExpressionReturn());
1725-
if (!ContextInfo.getPossibleCallees().empty()) {
1726-
for (auto &typeAndDecl : ContextInfo.getPossibleCallees())
1727-
Lookup.tryFunctionCallCompletions(typeAndDecl.Type, typeAndDecl.Decl,
1728-
typeAndDecl.SemanticContext);
1729-
} else if (ExprType && ((*ExprType)->is<AnyFunctionType>() ||
1730-
(*ExprType)->is<AnyMetatypeType>())) {
1731-
Lookup.getValueExprCompletions(*ExprType, ReferencedDecl.getDecl());
1732-
}
1733-
} else {
1734-
// Add argument labels, then fallthrough to get values.
1735-
Lookup.addCallArgumentCompletionResults(ContextInfo.getPossibleParams());
1736-
}
1737-
1738-
if (!Lookup.FoundFunctionCalls ||
1739-
(Lookup.FoundFunctionCalls &&
1740-
Lookup.FoundFunctionsWithoutFirstKeyword)) {
1741-
Lookup.setExpectedTypes(ContextInfo.getPossibleTypes(),
1742-
ContextInfo.isImplicitSingleExpressionReturn());
1743-
Lookup.setHaveLParen(false);
1744-
1745-
// Add any keywords that can be used in an argument expr position.
1746-
addSuperKeyword(CompletionContext.getResultSink(), CurDeclContext);
1747-
addExprKeywords(CompletionContext.getResultSink(), CurDeclContext);
1748-
1749-
DoPostfixExprBeginning();
1750-
}
1751-
break;
1752-
}
1753-
17541717
case CompletionKind::KeyPathExprObjC: {
17551718
if (DotLoc.isValid())
17561719
Lookup.setHaveDot(DotLoc);

lib/Parse/ParseDecl.cpp

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3681,15 +3681,22 @@ ParserResult<CustomAttr> Parser::parseCustomAttribute(
36813681
ArgumentList *argList = nullptr;
36823682
if (Tok.isFollowingLParen() && isCustomAttributeArgument()) {
36833683
if (peekToken().is(tok::code_complete)) {
3684-
consumeToken(tok::l_paren);
3684+
auto lParenLoc = consumeToken(tok::l_paren);
3685+
auto typeE = new (Context) TypeExpr(type.get());
3686+
auto CCE = new (Context) CodeCompletionExpr(Tok.getLoc());
36853687
if (CodeCompletionCallbacks) {
3686-
auto typeE = new (Context) TypeExpr(type.get());
3687-
auto CCE = new (Context) CodeCompletionExpr(Tok.getLoc());
36883688
CodeCompletionCallbacks->completePostfixExprParen(typeE, CCE);
36893689
}
36903690
consumeToken(tok::code_complete);
3691-
skipUntil(tok::r_paren);
3692-
consumeIf(tok::r_paren);
3691+
skipUntilDeclStmtRBrace(tok::r_paren);
3692+
auto rParenLoc = PreviousLoc;
3693+
if (Tok.is(tok::r_paren)) {
3694+
rParenLoc = consumeToken(tok::r_paren);
3695+
}
3696+
3697+
argList = ArgumentList::createParsed(
3698+
Context, lParenLoc, {Argument::unlabeled(CCE)}, rParenLoc,
3699+
/*trailingClosureIdx=*/None);
36933700
status.setHasCodeCompletionAndIsError();
36943701
} else {
36953702
// If we have no local context to parse the initial value into, create

test/IDE/complete_at_top_level.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ func resyncParserB14() {}
295295
"\(1) \(#^STRING_INTERP_2?check=STRING_INTERP^#) \(2)"
296296
var stringInterp = "\(#^STRING_INTERP_3?check=STRING_INTERP^#)"
297297
_ = "" + "\(#^STRING_INTERP_4?check=STRING_INTERP^#)" + ""
298-
// STRING_INTERP-DAG: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]/IsSystem: ['(']{#(value): T#}[')'][#Void#];
298+
// STRING_INTERP-DAG: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]/IsSystem: ['(']{#(value): Any.Type#}[')'][#Void#];
299299
// STRING_INTERP-DAG: Decl[Struct]/CurrModule: FooStruct[#FooStruct#]; name=FooStruct
300300
// STRING_INTERP-DAG: Decl[FreeFunction]/CurrModule/TypeRelation[Invalid]: fooFunc1()[#Void#];
301301
// STRING_INTERP-DAG: Decl[FreeFunction]/CurrModule: optStr()[#String?#];

test/IDE/complete_call_arg.swift

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ class C3 {
221221
// OVERLOAD6-DAG: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]: ['(']{#(a1): C1#}, {#b1: C2#}[')'][#Void#]; name=:b1:
222222
// OVERLOAD6-DAG: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]: ['(']{#a2: C2#}, {#b2: C1#}[')'][#Void#]; name=a2:b2:
223223
// OVERLOAD6-DAG: Decl[InstanceVar]/CurrNominal/TypeRelation[Convertible]: C1I[#C1#]; name=C1I
224-
// OVERLOAD6-DAG: Decl[InstanceVar]/CurrNominal: C2I[#C2#]; name=C2I
224+
// OVERLOAD6-DAG: Decl[InstanceVar]/CurrNominal/TypeRelation[Convertible]: C2I[#C2#]; name=C2I
225225

226226
extension C3 {
227227
func hasError(a1: C1, b1: TypeInvalid) -> Int {}
@@ -234,7 +234,7 @@ extension C3 {
234234
}
235235
}
236236

237-
// HASERROR1-DAG: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]: ['(']{#a1: C1#}, {#b1: <<error type>>#}[')'][#Int#];
237+
// HASERROR1-DAG: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]: ['(']{#a1: C1#}, {#b1: _#}[')'][#Int#];
238238

239239
// HASERROR2-DAG: Decl[InstanceVar]/CurrNominal/TypeRelation[Convertible]: C1I[#C1#];
240240
// HASERROR2-DAG: Decl[InstanceVar]/CurrNominal: C2I[#C2#];
@@ -426,8 +426,8 @@ class Bar {
426426
func curry<T1, T2, R>(_ f: @escaping (T1, T2) -> R) -> (T1) -> (T2) -> R {
427427
return { t1 in { t2 in f(#^NESTED_CLOSURE^#, t2) } }
428428
// FIXME: Should be '/TypeRelation[Invalid]: t2[#T2#]'
429-
// NESTED_CLOSURE: Decl[LocalVar]/Local: t2; name=t2
430-
// NESTED_CLOSURE: Decl[LocalVar]/Local: t1; name=t1
429+
// NESTED_CLOSURE: Decl[LocalVar]/Local: t2[#T2#]; name=t2
430+
// NESTED_CLOSURE: Decl[LocalVar]/Local/TypeRelation[Convertible]: t1[#T1#]; name=t1
431431
}
432432

433433
func trailingClosureLocal(x: Int, fn: (Int) -> Void) {
@@ -554,8 +554,8 @@ func testStaticMemberCall() {
554554
// STATIC_METHOD_AFTERPAREN_1: Decl[StaticMethod]/CurrNominal/Flair[ArgLabels]: ['(']{#arg1: Int#}[')'][#TestStaticMemberCall#]; name=arg1:
555555

556556
let _ = TestStaticMemberCall.create2(#^STATIC_METHOD_AFTERPAREN_2^#)
557-
// STATIC_METHOD_AFTERPAREN_2-DAG: Decl[StaticMethod]/CurrNominal/Flair[ArgLabels]/TypeRelation[Convertible]: ['(']{#(arg1): Int#}[')'][#TestStaticMemberCall#];
558-
// STATIC_METHOD_AFTERPAREN_2-DAG: Decl[StaticMethod]/CurrNominal/Flair[ArgLabels]/TypeRelation[Convertible]: ['(']{#(arg1): Int#}, {#arg2: Int#}, {#arg3: Int#}, {#arg4: Int#}[')'][#TestStaticMemberCall#];
557+
// STATIC_METHOD_AFTERPAREN_2-DAG: Decl[StaticMethod]/CurrNominal/Flair[ArgLabels]: ['(']{#(arg1): Int#}[')'][#TestStaticMemberCall#];
558+
// STATIC_METHOD_AFTERPAREN_2-DAG: Decl[StaticMethod]/CurrNominal/Flair[ArgLabels]: ['(']{#(arg1): Int#}, {#arg2: Int#}, {#arg3: Int#}, {#arg4: Int#}[')'][#TestStaticMemberCall#];
559559
// STATIC_METHOD_AFTERPAREN_2-DAG: Decl[Struct]/OtherModule[Swift]/IsSystem/TypeRelation[Convertible]: Int[#Int#];
560560
// STATIC_METHOD_AFTERPAREN_2-DAG: Literal[Integer]/None/TypeRelation[Convertible]: 0[#Int#];
561561

@@ -600,9 +600,8 @@ func testImplicitMember() {
600600
// IMPLICIT_MEMBER_SKIPPED: Pattern/Local/Flair[ArgLabels]: {#arg4: Int#}[#Int#];
601601

602602
let _: TestStaticMemberCall = .createOverloaded(#^IMPLICIT_MEMBER_OVERLOADED^#)
603-
// IMPLICIT_MEMBER_OVERLOADED: Begin completions, 2 items
603+
// IMPLICIT_MEMBER_OVERLOADED: Begin completions, 1 item
604604
// IMPLICIT_MEMBER_OVERLOADED: Decl[StaticMethod]/CurrNominal/Flair[ArgLabels]/TypeRelation[Convertible]: ['(']{#arg1: Int#}[')'][#TestStaticMemberCall#]; name=arg1:
605-
// IMPLICIT_MEMBER_OVERLOADED: Decl[StaticMethod]/CurrNominal/Flair[ArgLabels]: ['(']{#arg1: String#}[')'][#String#]; name=arg1:
606605
}
607606
func testImplicitMemberInArrayLiteral() {
608607
struct Receiver {
@@ -664,7 +663,7 @@ struct TestHasErrorAutoclosureParam {
664663
func test() {
665664
hasErrorAutoclosureParam(#^PARAM_WITH_ERROR_AUTOCLOSURE^#
666665
// PARAM_WITH_ERROR_AUTOCLOSURE: Begin completions, 1 items
667-
// PARAM_WITH_ERROR_AUTOCLOSURE: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]: ['(']{#value: <<error type>>#}[')'][#Void#];
666+
// PARAM_WITH_ERROR_AUTOCLOSURE: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]: ['(']{#value: _#}[')'][#Void#];
668667
}
669668
}
670669

@@ -1281,8 +1280,8 @@ extension Rdar89773376 {
12811280
func testRdar89773376(arry: [Int]) {
12821281
arry.map { Rdar89773376(#^RDAR89773376^#) }
12831282
// RDAR89773376: Begin completions, 2 items
1284-
// RDAR89773376-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#string: String#}[')'][#Rdar89773376#];
1285-
// RDAR89773376-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#intVal: Int#}[')'][#Rdar89773376#];
1283+
// RDAR89773376-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]/TypeRelation[Convertible]: ['(']{#string: String#}[')'][#Rdar89773376#];
1284+
// RDAR89773376-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]/TypeRelation[Convertible]: ['(']{#intVal: Int#}[')'][#Rdar89773376#];
12861285
}
12871286

12881287
// This is an incomplete macro definition but it's sufficient to get the signature for code completion purposes

test/IDE/complete_constructor.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,8 @@ func testDependentTypeInClosure() {
316316
// DEPENDENT_IN_CLOSURE_3-DAG: Decl[Constructor]/CurrNominal/TypeRelation[Convertible]: init({#arg: DataType#}, {#fn: () -> Data.Content##() -> Data.Content#})[#DependentTypeInClosure<DataType>#];
317317

318318
let _ = DependentTypeInClosure(#^DEPENDENT_IN_CLOSURE_1^#)
319-
// DEPENDENT_IN_CLOSURE_1-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#(arg): _#}, {#fn: (_.Content) -> Void##(_.Content) -> Void#}[')'][#DependentTypeInClosure<_>#];
320-
// DEPENDENT_IN_CLOSURE_1-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#arg: _#}, {#fn: () -> _.Content##() -> _.Content#}[')'][#DependentTypeInClosure<_>#];
319+
// DEPENDENT_IN_CLOSURE_1-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#(arg): DataType#}, {#fn: (_) -> Void##(_) -> Void#}[')'][#DependentTypeInClosure<DataType>#];
320+
// DEPENDENT_IN_CLOSURE_1-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#arg: DataType#}, {#fn: () -> _##() -> _#}[')'][#DependentTypeInClosure<DataType>#];
321321

322322
let _ = DependentTypeInClosure.#^DEPENDENT_IN_CLOSURE_2^#
323323
// DEPENDENT_IN_CLOSURE_2: Begin completions, 4 items
@@ -335,8 +335,8 @@ extension InitWithUnresolved where Self.Data: Comparable {
335335
func testInitWithUnresolved() {
336336
let _ = InitWithUnresolved(#^INIT_WITH_UNRESOLVEDTYPE_1^#
337337
// INIT_WITH_UNRESOLVEDTYPE_1: Begin completions, 2 items
338-
// INIT_WITH_UNRESOLVEDTYPE_1-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#arg: _#}, {#fn: (_.Content) -> Void##(_.Content) -> Void#}[')'][#InitWithUnresolved<_>#];
339-
// INIT_WITH_UNRESOLVEDTYPE_1-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#arg2: _#}[')'][#InitWithUnresolved<_>#];
338+
// INIT_WITH_UNRESOLVEDTYPE_1-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#arg: DataType#}, {#fn: (_) -> Void##(_) -> Void#}[')'][#InitWithUnresolved<DataType>#];
339+
// INIT_WITH_UNRESOLVEDTYPE_1-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#arg2: DataType#}[')'][#InitWithUnresolved<DataType>#];
340340
}
341341

342342
func testIgnoreGenericArgsAfterCompletionToken() {

test/IDE/complete_crashes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func rdar22834017() {
156156
Foo(#^RDAR_22834017^#)
157157
}
158158
// RDAR_22834017: Begin completions, 1 items
159-
// RDAR_22834017: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#a: <<error type>>#}, {#b: <<error type>>#}, {#c: <<error type>>#}[')'][#Foo#];
159+
// RDAR_22834017: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#a: _#}, {#b: _#}, {#c: _#}[')'][#Foo#];
160160

161161
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RDAR_23173692 | %FileCheck %s -check-prefix=RDAR_23173692
162162
func rdar23173692() {

test/IDE/complete_diagnostics_concurrency.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func testActor(obj: MyActor) async {
2929

3030
func testClosure(obj: (Int) async -> Void) {
3131
obj(#^CLOSURE_CALL^#)
32-
// CLOSURE_CALL-DAG: Pattern/CurrModule/Flair[ArgLabels]/NotRecommended: ['(']{#Int#}[')'][' async'][#Void#]; name=; diagnostics=error:async function used in a context that does not support concurrency
32+
// CLOSURE_CALL-DAG: Pattern/Local/Flair[ArgLabels]/NotRecommended: ['(']{#Int#}[')'][' async'][#Void#]; name=; diagnostics=error:async function used in a context that does not support concurrency
3333
}
3434

3535
func test() {

test/IDE/complete_enum_unresolved_dot_argument_labels.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ func testInit() {
1111
var state = DragState.inactive
1212
state = .dragging(#^SIGNATURE^#)
1313
// SIGNATURE: Begin completions, 1 item
14-
// SIGNATURE: Pattern/CurrModule/Flair[ArgLabels]/TypeRelation[Convertible]: ['(']{#translationX: Int#}, {#translationY: Int#}[')'][#DragState#];
14+
// SIGNATURE: Pattern/CurrNominal/Flair[ArgLabels]/TypeRelation[Convertible]: ['(']{#translationX: Int#}, {#translationY: Int#}[')'][#DragState#];
1515

1616
state = .dragging(translationX: 2, #^ARGUMENT^#)
1717
// ARGUMENT: Begin completions, 1 item
1818
// ARGUMENT: Pattern/Local/Flair[ArgLabels]: {#translationY: Int#}[#Int#];
1919

2020
state = .defaulted(#^DEFAULTED^#)
2121
// DEFAULTED: Begin completions, 1 items
22-
// DEFAULTED: Pattern/CurrModule/Flair[ArgLabels]/TypeRelation[Convertible]: ['(']{#x: Int#}, {#y: Int#}, {#z: Int#}, {#extra: Int#}[')'][#DragState#];
22+
// DEFAULTED: Pattern/CurrNominal/Flair[ArgLabels]/TypeRelation[Convertible]: ['(']{#x: Int#}, {#y: Int#}, {#z: Int#}, {#extra: Int#}[')'][#DragState#];
2323

2424
state = .defaulted(x: 1, #^DEFAULTEDARG^#)
2525
state = .defaulted(x: "Wrong type", #^ERRORTYPE?check=DEFAULTEDARG^#)

test/IDE/complete_in_result_builder.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,20 @@ func testGlobalLookup() {
4040

4141
@TupleBuilder<String> var x2 {
4242
if true {
43-
#^GLOBAL_LOOKUP_IN_IF_BODY?check=GLOBAL_LOOKUP_NO_TYPE_RELATION^#
44-
// GLOBAL_LOOKUP_NO_TYPE_RELATION: Decl[GlobalVar]/CurrModule: MyConstantString[#String#];
43+
#^GLOBAL_LOOKUP_IN_IF_BODY^#
44+
// GLOBAL_LOOKUP_IN_IF_BODY: Decl[GlobalVar]/CurrModule: MyConstantString[#String#];
4545
}
4646
}
4747

4848
@TupleBuilder<String> var x3 {
4949
if {
50-
#^GLOBAL_LOOKUP_IN_IF_BODY_WITHOUT_CONDITION?check=GLOBAL_LOOKUP_NO_TYPE_RELATION^#
50+
#^GLOBAL_LOOKUP_IN_IF_BODY_WITHOUT_CONDITION?check=GLOBAL_LOOKUP_IN_IF_BODY^#
5151
}
5252
}
5353

5454
@TupleBuilder<String> var x4 {
5555
guard else {
56-
#^GLOBAL_LOOKUP_IN_GUARD_BODY_WITHOUT_CONDITION?check=GLOBAL_LOOKUP_NO_TYPE_RELATION^#
56+
#^GLOBAL_LOOKUP_IN_GUARD_BODY_WITHOUT_CONDITION?check=GLOBAL_LOOKUP_IN_IF_BODY^#
5757
}
5858
}
5959

@@ -85,7 +85,7 @@ func testStaticMemberLookup() {
8585
}
8686

8787
@TupleBuilder<String> var x3 {
88-
"hello: \(StringFactory.#^COMPLETE_STATIC_MEMBER_IN_STRING_LITERAL?xfail=rdar106720628^#)"
88+
"hello: \(StringFactory.#^COMPLETE_STATIC_MEMBER_IN_STRING_LITERAL^#)"
8989
// COMPLETE_STATIC_MEMBER_IN_STRING_LITERAL: Begin completions
9090
// COMPLETE_STATIC_MEMBER_IN_STRING_LITERAL: Decl[StaticMethod]/CurrNominal/TypeRelation[Convertible]: makeString({#x: String#})[#String#];
9191
// COMPLETE_STATIC_MEMBER_IN_STRING_LITERAL: End completions
@@ -135,7 +135,7 @@ func testCompleteFunctionArgumentLabels() {
135135
@TupleBuilder<String> var x1 {
136136
StringFactory.makeString(#^FUNCTION_ARGUMENT_LABEL^#)
137137
// FUNCTION_ARGUMENT_LABEL: Begin completions, 1 item
138-
// FUNCTION_ARGUMENT_LABEL: Decl[StaticMethod]/CurrNominal/Flair[ArgLabels]: ['(']{#x: String#}[')'][#String#];
138+
// FUNCTION_ARGUMENT_LABEL: Decl[StaticMethod]/CurrNominal/Flair[ArgLabels]/TypeRelation[Convertible]: ['(']{#x: String#}[')'][#String#];
139139
}
140140
}
141141

test/IDE/complete_init_inherited.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class D : C {
7070

7171
// TEST_D_PAREN: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#d: D#}[')'][#D#]; name=d:
7272
// TEST_D_PAREN-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#int: Int#}[')'][#D#]; name=int:
73-
// TEST_D_PAREN-DAG: Decl[Constructor]/Super/Flair[ArgLabels]: ['(']{#c: C#}[')'][#C#]; name=c:
73+
// TEST_D_PAREN-DAG: Decl[Constructor]/Super/Flair[ArgLabels]: ['(']{#c: C#}[')'][#D#]; name=c:
7474

7575
func testA() {
7676
A#^TEST_A^#
@@ -101,5 +101,5 @@ func testR74233797() {
101101
R74233797Derived(#^METATYPE_CONVERSION^#)
102102
// METATYPE_CONVERSION-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#sub: Bool#}[')'][#R74233797Derived#];
103103
// METATYPE_CONVERSION-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['('][')'][#R74233797Derived#];
104-
// METATYPE_CONVERSION-DAG: Decl[Constructor]/Super/Flair[ArgLabels]: ['(']{#(test): Bool#}[')'][#R74233797Base#];
104+
// METATYPE_CONVERSION-DAG: Decl[Constructor]/Super/Flair[ArgLabels]: ['(']{#(test): Bool#}[')'][#R74233797Derived#];
105105
}

0 commit comments

Comments
 (0)