Skip to content

Commit ec79395

Browse files
committed
---
yaml --- r: 347198 b: refs/heads/master c: 23a708b h: refs/heads/master
1 parent 90310c8 commit ec79395

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: ffe746eda3469b5933738aa8f577b2d89201cf45
2+
refs/heads/master: 23a708b7752841ed841b70d062dfd6e00d488436
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/lib/IDE/CodeCompletion.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,6 +1948,10 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
19481948
if (!MaybeNominalType->mayHaveMembers())
19491949
return T;
19501950

1951+
// We can't do anything if the base type has unbound generic parameters.
1952+
if (MaybeNominalType->hasUnboundGenericType())
1953+
return T;
1954+
19511955
// For everything else, substitute in the base type.
19521956
auto Subs = MaybeNominalType->getMemberSubstitutionMap(M, VD);
19531957

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
}

0 commit comments

Comments
 (0)