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(
533533 SmallVectorImpl<FunctionTypeAndDecl> &candidates) {
534534 ConcreteDeclRef ref = nullptr ;
535535
536+ if (auto ice = dyn_cast<ImplicitConversionExpr>(baseExpr))
537+ baseExpr = ice->getSyntacticSubExpr ();
538+
536539 // Re-typecheck TypeExpr so it's typechecked without the arguments which may
537540 // affects the inference of the generic arguments.
538541 if (TypeExpr *tyExpr = dyn_cast<TypeExpr>(baseExpr)) {
Original file line number Diff line number Diff line change 44// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_D | %FileCheck %s -check-prefix=TEST_D
55// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_D_DOT | %FileCheck %s -check-prefix=TEST_D_DOT
66// 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
78
89class A {
910 init ( int i: Int ) { }
@@ -96,3 +97,19 @@ func testD() {
9697 D. #^TEST_D_DOT^#
9798 D( #^TEST_D_PAREN^#
9899}
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