mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This is necessary to disambiguate some symbols with the same path components and makes the data clearer to debug. rdar://problem/59841727
16 lines
555 B
Swift
16 lines
555 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-build-swift %s -module-name InstanceSubscript -emit-module -emit-module-path %t/
|
|
// RUN: %target-swift-symbolgraph-extract -module-name InstanceSubscript -I %t -pretty-print -output-dir %t
|
|
// RUN: %FileCheck %s --input-file %t/InstanceSubscript.symbols.json
|
|
|
|
public struct S {
|
|
// CHECK: "identifier": "swift.subscript"
|
|
// CHECK-NEXT: "displayName": "Instance Subscript"
|
|
// CHECK: pathComponents
|
|
// CHECK-NEXT: "S"
|
|
// CHECK-NEXT: "subscript(_:)"
|
|
public subscript(i: Int) -> Int {
|
|
return 2
|
|
}
|
|
}
|