File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
validation-test/IDE/crashers_2_fixed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1948,6 +1948,10 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
1948
1948
if (!MaybeNominalType->mayHaveMembers ())
1949
1949
return T;
1950
1950
1951
+ // We can't do anything if the base type has unbound generic parameters.
1952
+ if (MaybeNominalType->hasUnboundGenericType ())
1953
+ return T;
1954
+
1951
1955
// For everything else, substitute in the base type.
1952
1956
auto Subs = MaybeNominalType->getMemberSubstitutionMap (M, VD);
1953
1957
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-ide-test -code-completion -code-completion-token=COMPLETE -source-filename=%s
2
+
3
+ class Foo < T> {
4
+ }
5
+
6
+ extension Foo where T: Comparable {
7
+ func foo( ) { }
8
+ }
9
+
10
+ protocol P {
11
+ typealias alias = Foo
12
+ }
13
+ protocol P { }
14
+
15
+ func Test( ) {
16
+ P . alias. #^COMPLETE^#
17
+ }
You can’t perform that action at this time.
0 commit comments