File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1
1
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_DOT_1 | %FileCheck %s -check-prefix=FOO_OBJECT_DOT
2
2
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=BAR_OBJECT_DOT_1 | %FileCheck %s -check-prefix=BAR_OBJECT_DOT
3
+ // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CATCHSEQUENCE_DOT | %FileCheck %s -check-prefix=CATCHSEQUENCE_DOT
3
4
4
5
protocol FooBaseProtocol {
5
6
var instanceProperty : Int { get }
@@ -35,3 +36,21 @@ func test(a: BarStruct) {
35
36
a. #^BAR_OBJECT_DOT_1^#
36
37
}
37
38
39
+ protocol ObservableConvertibleType {
40
+ associatedtype T
41
+ }
42
+ class Observable < T> : ObservableConvertibleType { }
43
+ class CatchSequence < S: Sequence > : Observable < S . Element . T > where S. Element: ObservableConvertibleType { }
44
+
45
+ extension ObservableConvertibleType {
46
+ static func catchError( ) -> Observable < T > {
47
+ return CatchSequence. #^CATCHSEQUENCE_DOT^#
48
+ }
49
+ }
50
+ // CATCHSEQUENCE_DOT: Begin completions
51
+ // CATCHSEQUENCE_DOT-DAG: Keyword[self]/CurrNominal: self[#CatchSequence<_>.Type#]; name=self
52
+ // CATCHSEQUENCE_DOT-DAG: Keyword/CurrNominal: Type[#CatchSequence<_>.Type#]; name=Type
53
+ // CATCHSEQUENCE_DOT-DAG: Decl[Constructor]/CurrNominal: init()[#CatchSequence<_>#]; name=init()
54
+ // CATCHSEQUENCE_DOT-DAG: Decl[StaticMethod]/Super: catchError()[#Observable<CatchSequence<_>.T>#]; name=catchError()
55
+ // CATCHSEQUENCE_DOT-DAG: Decl[TypeAlias]/Super: T[#T#]; name=T
56
+ // CATCHSEQUENCE_DOT: End completions
You can’t perform that action at this time.
0 commit comments