mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When a module extends a type from another module, serialize those symbols into separated files dedicated to those extended modules. This makes it easier to ingest and categorize those symbols under the extended module if desired. rdar://58941718
21 lines
559 B
Swift
21 lines
559 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-build-swift %s -module-name Overrides -emit-module -emit-module-path %t/
|
|
// RUN: %target-swift-symbolgraph-extract -module-name Overrides -I %t -pretty-print -output-dir %t
|
|
// RUN: %FileCheck %s --input-file %t/Overrides.symbols.json
|
|
|
|
public class Base {
|
|
public var x: Int {
|
|
return 1
|
|
}
|
|
}
|
|
|
|
public class Derived: Base {
|
|
public override var x: Int {
|
|
return 2
|
|
}
|
|
}
|
|
|
|
// CHECK: "kind": "overrides"
|
|
// CHECK-NEXT: "source": "s:9Overrides7DerivedC1xSivp"
|
|
// CHECK-NEXT: "target": "s:9Overrides4BaseC1xSivp"
|