File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
test/SymbolGraph/Symbols/Mixins Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ void Symbol::serializeSwiftGenericMixin(llvm::json::OStream &OS) const {
287
287
288
288
void Symbol::serializeSwiftExtensionMixin (llvm::json::OStream &OS) const {
289
289
if (const auto *Extension
290
- = dyn_cast_or_null<ExtensionDecl>(VD->getInnermostDeclContext ())) {
290
+ = dyn_cast_or_null<ExtensionDecl>(VD->getDeclContext ())) {
291
291
::serialize (Extension, OS);
292
292
}
293
293
}
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %target-build-swift %s -module-name Extension -emit-module-path %t/Extension.swiftmodule
3
+ // RUN: %target-swift-symbolgraph-extract -module-name Extension -I %t -pretty-print -output-dir %t
4
+ // RUN: %FileCheck %s --input-file %t/Extension.symbols.json
5
+
6
+ public struct Outer < T> {
7
+ public var x : T
8
+ public init ( x: T ) {
9
+ self . x = x
10
+ }
11
+ }
12
+
13
+ extension Outer where T == Int {
14
+ // This type's swiftExtension mixin should not include generic
15
+ // constraints regarding U.
16
+
17
+ // CHECK: swiftExtension
18
+ // CHECK: constraints
19
+ // CHECK: "kind": "sameType"
20
+ // CHECK: "lhs": "T"
21
+ // CHECK: "rhs": "Int"
22
+ public struct Inner < U: Sequence > {
23
+ public var x : U
24
+ public init ( x: U ) {
25
+ self . x = x
26
+ }
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments