File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -533,6 +533,9 @@ static void collectPossibleCalleesByQualifiedLookup(
533
533
SmallVectorImpl<FunctionTypeAndDecl> &candidates) {
534
534
ConcreteDeclRef ref = nullptr ;
535
535
536
+ if (auto ice = dyn_cast<ImplicitConversionExpr>(baseExpr))
537
+ baseExpr = ice->getSyntacticSubExpr ();
538
+
536
539
// Re-typecheck TypeExpr so it's typechecked without the arguments which may
537
540
// affects the inference of the generic arguments.
538
541
if (TypeExpr *tyExpr = dyn_cast<TypeExpr>(baseExpr)) {
Original file line number Diff line number Diff line change 4
4
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_D | %FileCheck %s -check-prefix=TEST_D
5
5
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_D_DOT | %FileCheck %s -check-prefix=TEST_D_DOT
6
6
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_D_PAREN | %FileCheck %s -check-prefix=TEST_D_PAREN
7
+ // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=METATYPE_CONVERSION | %FileCheck %s -check-prefix=METATYPE_CONVERSION
7
8
8
9
class A {
9
10
init ( int i: Int ) { }
@@ -96,3 +97,19 @@ func testD() {
96
97
D. #^TEST_D_DOT^#
97
98
D( #^TEST_D_PAREN^#
98
99
}
100
+
101
+ class R74233797Base {
102
+ init ( ) { }
103
+ convenience init ( _ test: Bool ) { self . init ( ) }
104
+ }
105
+ class R74233797Derived : R74233797Base {
106
+ convenience init ( sub: Bool ) { self . init ( sub) }
107
+ }
108
+ func testR74233797( ) {
109
+ R74233797Derived ( #^METATYPE_CONVERSION^#)
110
+ // METATYPE_CONVERSION: Begin completions
111
+ // METATYPE_CONVERSION-DAG: Decl[Constructor]/CurrNominal: ['(']{#sub: Bool#}[')'][#R74233797Derived#];
112
+ // METATYPE_CONVERSION-DAG: Decl[Constructor]/CurrNominal: ['('][')'][#R74233797Derived#];
113
+ // METATYPE_CONVERSION-DAG: Decl[Constructor]/Super: ['(']{#(test): Bool#}[')'][#R74233797Base#];
114
+ // METATYPE_CONVERSION: End completions
115
+ }
You can’t perform that action at this time.
0 commit comments