|
1 | 1 | // RUN: rm -rf %t && mkdir %t
|
2 |
| -// RUN: %target-swift-frontend -emit-module-path %t/print_synthesized_extensions.swiftmodule %s |
| 2 | +// RUN: %target-swift-frontend -emit-module-path %t/print_synthesized_extensions.swiftmodule -emit-module-doc -emit-module-doc-path %t/print_synthesized_extensions.swiftdoc %s |
3 | 3 | // RUN: %target-swift-ide-test -print-module -annotate-print -synthesize-extension -print-interface -module-to-print=print_synthesized_extensions -I %t -source-filename=%s > %t.syn.txt
|
4 | 4 | // RUN: FileCheck %s < %t.syn.txt
|
5 | 5 |
|
@@ -123,6 +123,20 @@ public struct S10 : P1 {
|
123 | 123 | }
|
124 | 124 | }
|
125 | 125 |
|
| 126 | +public protocol P4 {} |
| 127 | + |
| 128 | +/// Extension on P4Func1 |
| 129 | +public extension P4 { |
| 130 | + func P4Func1() {} |
| 131 | +} |
| 132 | + |
| 133 | +/// Extension on P4Func2 |
| 134 | +public extension P4 { |
| 135 | + func P4Func2() {} |
| 136 | +} |
| 137 | + |
| 138 | +public struct S11 : P4 {} |
| 139 | + |
126 | 140 | // CHECK: <synthesized>
|
127 | 141 | // CHECK: extension <ref:Struct>S1</ref> where T : P2 {
|
128 | 142 | // CHECK: <decl:Func>public func <loc>p2member()</loc></decl></synthesized>
|
@@ -155,6 +169,16 @@ public struct S10 : P1 {
|
155 | 169 | // CHECK: <decl:Func>public func <loc>S9IntFunc()</loc></decl>
|
156 | 170 | // CHECK: }</synthesized>
|
157 | 171 |
|
| 172 | +// CHECK: <synthesized>/// Extension on P4Func1 |
| 173 | +// CHECK: extension <ref:Struct>S11</ref> { |
| 174 | +// CHECK: <decl:Func>public func <loc>P4Func1()</loc></decl> |
| 175 | +// CHECK: }</synthesized> |
| 176 | + |
| 177 | +// CHECK: <synthesized>/// Extension on P4Func2 |
| 178 | +// CHECK: extension <ref:Struct>S11</ref> { |
| 179 | +// CHECK: <decl:Func>public func <loc>P4Func2()</loc></decl> |
| 180 | +// CHECK: }</synthesized> |
| 181 | + |
158 | 182 | // CHECK: <synthesized>
|
159 | 183 | // CHECK: extension <ref:Struct>S4</ref> {
|
160 | 184 | // CHECK: <decl:Func>public func <loc>p1IntFunc(<decl:Param>i: <ref:Struct>Int</ref></decl>)</loc> -> <ref:Struct>Int</ref></decl>
|
|
0 commit comments