Skip to content

Commit

Permalink
Fix Xcode 16 compiler warning
Browse files Browse the repository at this point in the history
...
  • Loading branch information
helje5 committed Jun 26, 2024
1 parent 74bfa26 commit e96080b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Sources/ManagedModels/PersistentModel/PersistentIdentifier.swift
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
//
// Created by Helge Heß.
// Copyright © 2023 ZeeZide GmbH.
// Copyright © 2023-2024 ZeeZide GmbH.
//

import CoreData

public typealias PersistentIdentifier = NSManagedObjectID

extension NSManagedObjectID: Identifiable {

#if compiler(>=6)
extension NSManagedObjectID: @retroactive Identifiable, @retroactive Encodable {
}
#else
extension NSManagedObjectID: Identifiable, Encodable {}
#endif

extension NSManagedObjectID {
public typealias ID = NSManagedObjectID

@inlinable
public var id: Self { self }
}

extension NSManagedObjectID: Encodable {
extension NSManagedObjectID {

@inlinable
public func encode(to encoder: Encoder) throws {
Expand Down

0 comments on commit e96080b

Please sign in to comment.