Skip to content

Commit fd6a09b

Browse files
authored
Fix compiler warnings (#3157)
using 'class' keyword for protocol inheritance is deprecated; use 'AnyObject' instead
1 parent ec407ac commit fd6a09b

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

Sources/Build/SwiftCompilerOutputParser.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public struct SwiftCompilerMessage {
8484
}
8585

8686
/// Protocol for the parser delegate to get notified of parsing events.
87-
public protocol SwiftCompilerOutputParserDelegate: class {
87+
public protocol SwiftCompilerOutputParserDelegate: AnyObject {
8888

8989
/// Called for each message parsed.
9090
func swiftCompilerOutputParser(_ parser: SwiftCompilerOutputParser, didParse message: SwiftCompilerMessage)

Sources/SourceControl/RepositoryManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import TSCUtility
1616
import Basics
1717

1818
/// Delegate to notify clients about actions being performed by RepositoryManager.
19-
public protocol RepositoryManagerDelegate: class {
19+
public protocol RepositoryManagerDelegate: AnyObject {
2020
/// Called when a repository is about to be fetched.
2121
func fetchingWillBegin(handle: RepositoryManager.RepositoryHandle, fetchDetails: RepositoryManager.FetchDetails?)
2222

Sources/XCBuildSupport/PIF.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,7 @@ private struct UntypedTarget: Decodable {
11901190
let contents: TargetContents
11911191
}
11921192

1193-
protocol PIFSignableObject: class {
1193+
protocol PIFSignableObject: AnyObject {
11941194
var signature: String? { get set }
11951195
}
11961196
extension PIF.Workspace: PIFSignableObject {}

Sources/XCBuildSupport/PIFBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ final class AggregatePIFProjectBuilder: PIFProjectBuilder {
894894
}
895895
}
896896

897-
protocol PIFReferenceBuilder: class {
897+
protocol PIFReferenceBuilder: AnyObject {
898898
var guid: String { get set }
899899

900900
func construct() -> PIF.Reference

Sources/XCBuildSupport/XCBuildOutputParser.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public enum XCBuildMessage {
124124
}
125125

126126
/// Protocol for the parser delegate to get notified of parsing events.
127-
public protocol XCBuildOutputParserDelegate: class {
127+
public protocol XCBuildOutputParserDelegate: AnyObject {
128128

129129
/// Called for each message parsed.
130130
func xcBuildOutputParser(_ parser: XCBuildOutputParser, didParse message: XCBuildMessage)

Sources/Xcodeproj/XcodeProjectModelSerialization.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ fileprivate class PropertyListSerializer {
571571
}
572572
}
573573

574-
fileprivate protocol PropertyListSerializable: class {
574+
fileprivate protocol PropertyListSerializable: AnyObject {
575575
/// Called by the Serializer to construct and return a dictionary for a
576576
/// serializable object. The entries in the dictionary should represent
577577
/// the receiver's attributes and relationships, as PropertyList values.

0 commit comments

Comments
 (0)