mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
f8911bc257
Previously, the `@_accessorBlock` disambiguation attribute was only emitted for observed variables. But We need `@_accessorBlock` disambiguation marker for simple stored properties with non-public setters in `@frozen` types too. rdar://171819084
23 lines
898 B
Plaintext
23 lines
898 B
Plaintext
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend -emit-module -o %t/Test.swiftmodule -emit-module-interface-path %t/Test.swiftinterface -module-name Test %s
|
|
// RUN: %target-swift-typecheck-module-from-interface(%t/Test.swiftinterface) -module-name Test
|
|
|
|
// RUN: %FileCheck %s --check-prefix INTERFACE --input-file %t/Test.swiftinterface
|
|
|
|
@frozen public struct Struct {
|
|
public var values: [Int] = .init() {
|
|
willSet {}
|
|
}
|
|
|
|
public internal(set) var dict: [String: Int] = [:]
|
|
}
|
|
// INTERFACE: @frozen public struct Struct {
|
|
// INTERFACE-LABEL: @_hasStorage public var values: [Swift::Int] = .init() { @_accessorBlock
|
|
// INTERFACE-NEXT: @_transparent get
|
|
// INTERFACE-NEXT: set
|
|
// INTERFACE-NEXT: }
|
|
// INTERFACE-LABEL: @_hasStorage public var dict: [Swift::String : Swift::Int] = [:] { @_accessorBlock
|
|
// INTERFACE-NEXT: get
|
|
// INTERFACE-NEXT: }
|
|
// INTERFACE: }
|