mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Emit copies of default implementations in protocol extensions and superclass declarations in conforming types and subclasses respectively using a virtual USR, i.e. `${REAL_USR}::SYNTHESIZED::${CONFORMING_OR_SUBCLASS_TYPE_USR}`.
- Add a -skip-synthesized-members option to skip these synthesized members.
- Create a new wrapping `Symbol` type that can also contain a base type declaration as well as the inherited declaration for those synthesized cases. Move some symbol-specific APIs there.
- Doc comments can “cascade” down to protocol extensions or refinements in concrete types. When emitting the doc comment for a symbol, look up through to superclasses or protocol requirements for where a doc comment is actually written.
- Clean up filtering of implicitly private (e.g. “public underscored”) types
rdar://problem/59128787
40 lines
924 B
Swift
40 lines
924 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-build-swift %s -module-name ASCIIArt -emit-module-path %t/ASCIIArt.swiftmodule
|
|
// RUN: %target-swift-symbolgraph-extract -module-name ASCIIArt -I %t -pretty-print -output-dir %t
|
|
// RUN: %FileCheck %s --input-file %t/ASCIIArt.symbols.json
|
|
|
|
/**
|
|
* With
|
|
* ASCII
|
|
* art.
|
|
*/
|
|
public struct S6 {}
|
|
|
|
// CHECK: range
|
|
// CHECK-NEXT: start
|
|
// CHECK-NEXT: "line": 6
|
|
// CHECK-NEXT: "character": 3
|
|
// CHECK: end
|
|
// CHECK-NEXT: "line": 6
|
|
// CHECK-NEXT: "character": 7
|
|
// CHECK: "text": "With"
|
|
|
|
// CHECK: range
|
|
// CHECK-NEXT: start
|
|
// CHECK-NEXT: "line": 7
|
|
// CHECK-NEXT: "character": 3
|
|
// CHECK: end
|
|
// CHECK-NEXT: "line": 7
|
|
// CHECK-NEXT: "character": 8
|
|
// CHECK: "text": "ASCII"
|
|
|
|
// CHECK: range
|
|
// CHECK-NEXT: start
|
|
// CHECK-NEXT: "line": 8
|
|
// CHECK-NEXT: "character": 3
|
|
// CHECK: end
|
|
// CHECK-NEXT: "line": 8
|
|
// CHECK-NEXT: "character": 7
|
|
// CHECK: "text": "art."
|
|
|