mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Since 'private' means "limit to the enclosing scope (and extensions thereof)", putting it on a member means that the member can't be accessed everywhere the type might show up. That's normally a good thing, but it's not the desired effect for synthesized members used for derived conformances, and when it comes to class initializers this actually violates AST invariants. rdar://problem/39478298
11 lines
419 B
Swift
11 lines
419 B
Swift
// RUN: %target-swift-frontend -print-ast %s 2>&1 | %FileCheck %s
|
|
|
|
// Check that synthesized members show up as 'fileprivate', not 'private.
|
|
|
|
// CHECK-LABEL: private struct PrivateConformer : Hashable {
|
|
private struct PrivateConformer: Hashable {
|
|
var value: Int
|
|
// CHECK-DAG: fileprivate var hashValue: Int { get }
|
|
// CHECK-DAG: @_implements(Equatable, ==(_:_:)) fileprivate static func __derived_struct_equals
|
|
}
|