File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
validation-test/IDE/crashers_2_fixed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,11 @@ void ConformingMethodListCallbacks::doneParsing() {
90
90
if (T->hasArchetype ())
91
91
T = T->mapTypeOutOfContext ();
92
92
93
+ // If there are no (instance) members for this type, bail.
94
+ if (!T->mayHaveMembers () || T->is <ModuleType>()) {
95
+ return ;
96
+ }
97
+
93
98
llvm::SmallPtrSet<ProtocolDecl*, 8 > expectedProtocols;
94
99
for (auto Name: ExpectedTypeNames) {
95
100
if (auto *PD = resolveProtocolName (CurDeclContext, Name)) {
@@ -107,8 +112,7 @@ void ConformingMethodListCallbacks::doneParsing() {
107
112
void ConformingMethodListCallbacks::getMatchingMethods (
108
113
Type T, llvm::SmallPtrSetImpl<ProtocolDecl*> &expectedTypes,
109
114
SmallVectorImpl<ValueDecl *> &result) {
110
- if (!T->mayHaveMembers ())
111
- return ;
115
+ assert (T->mayHaveMembers () && !T->is <ModuleType>());
112
116
113
117
class LocalConsumer : public VisibleDeclConsumer {
114
118
ModuleDecl *CurModule;
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-ide-test --conforming-methods --conforming-methods-expected-types=s:SQ -source-filename %s -code-completion-token=COMPLETE
2
+
3
+ Swift#^COMPLETE^#
You can’t perform that action at this time.
0 commit comments