mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
https://github.com/apple/swift/pull/42041 introduced a centralized mechanism for adding the `nonisolated` attribute to synthesized decls but did not clean up the existing code that was already doing so for `Hashable` conformances. Resolves rdar://102106591
19 lines
935 B
Swift
19 lines
935 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-emit-module-interface(%t/Library.swiftinterface) %s -disable-availability-checking -module-name Library
|
|
// RUN: %target-swift-typecheck-module-from-interface(%t/Library.swiftinterface) -disable-availability-checking -module-name Library
|
|
// RUN: %FileCheck %s < %t/Library.swiftinterface
|
|
|
|
// REQUIRES: concurrency
|
|
|
|
// CHECK: @_Concurrency.MainActor public struct X1 : Swift.Equatable, Swift.Hashable, Swift.Codable
|
|
@MainActor public struct X1: Equatable, Hashable, Codable {
|
|
let x: Int
|
|
let y: String
|
|
|
|
// CHECK: nonisolated public static func == (a: Library.X1, b: Library.X1) -> Swift.Bool
|
|
// CHECK: nonisolated public func hash(into hasher: inout Swift.Hasher)
|
|
// CHECK: nonisolated public func encode(to encoder: any Swift.Encoder) throws
|
|
// CHECK: nonisolated public var hashValue: Swift.Int
|
|
// CHECK: nonisolated public init(from decoder: any Swift.Decoder) throws
|
|
}
|