mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Print diagnostic groups as part of the LLVM printer in the same manner as the
Swift one does, always. Make `-print-diagnostic-groups` an inert option, since we
always print diagnostic group names with the `[#GroupName]` syntax.
As part of this, we no longer render the diagnostic group name as part
of the diagnostic *text*, instead leaving it up to the diagnostic
renderer to handle the category appropriately. Update all of the tests
that were depending on `-print-diagnostic-groups` putting it into the
text to instead use the `{{documentation-file=<file name>}}`
diagnostic verification syntax.
31 lines
1.1 KiB
Swift
31 lines
1.1 KiB
Swift
// RUN: %target-typecheck-verify-swift
|
|
// REQUIRES: concurrency
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
actor A1: Hashable {
|
|
nonisolated func hash(into hasher: inout Hasher) { }
|
|
static func ==(lhs: A1, rhs: A1) -> Bool { true }
|
|
}
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
actor A2: Hashable {
|
|
nonisolated var hashValue: Int { 0 } // expected-warning{{'Hashable.hashValue' is deprecated as a protocol requirement; conform type 'A2' to 'Hashable' by implementing 'hash(into:)' instead}}{{documentation-file=deprecated-declaration}}
|
|
static func ==(lhs: A2, rhs: A2) -> Bool { true }
|
|
}
|
|
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
@MainActor
|
|
class C1: Hashable {
|
|
nonisolated func hash(into hasher: inout Hasher) { }
|
|
nonisolated static func ==(lhs: C1, rhs: C1) -> Bool { true }
|
|
}
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
@MainActor
|
|
class C2: Hashable {
|
|
nonisolated var hashValue: Int { 0 } // expected-warning{{'Hashable.hashValue' is deprecated as a protocol requirement; conform type 'C2' to 'Hashable' by implementing 'hash(into:)' instead}}{{documentation-file=deprecated-declaration}}
|
|
nonisolated static func ==(lhs: C2, rhs: C2) -> Bool { true }
|
|
}
|
|
|