Skip to content

Commit 7adf03a

Browse files
committed
Fix 2024 build issue
1 parent 0438b7c commit 7adf03a

File tree

2 files changed

+28
-12
lines changed

2 files changed

+28
-12
lines changed

Sources/OpenSwiftUI/View/Shape/Path/Path.swift

+26-12
Original file line numberDiff line numberDiff line change
@@ -276,19 +276,33 @@ public struct Path/*: Equatable, LosslessStringConvertible*/ {
276276
extension Path {
277277
@usableFromInline
278278
final package class PathBox: Equatable {
279-
// #if OPENSWIFTUI_RELEASE_2024 // Also on RELEASE_2023
280-
// private var kind: Kind
279+
#if OPENSWIFTUI_RELEASE_2024 // Also on RELEASE_2023
280+
private var kind: Kind
281281
//// var data: PathData
282-
// private init() {
283-
// kind = .buffer
282+
private init() {
283+
kind = .buffer
284284
// // TODO
285-
// }
286-
// private enum Kind: UInt8 {
287-
// case cgPath
288-
// case rbPath
289-
// case buffer
290-
// }
291-
// #elseif OPENSWIFTUI_RELEASE_2021
285+
}
286+
private enum Kind: UInt8 {
287+
case cgPath
288+
case rbPath
289+
case buffer
290+
}
291+
292+
init(_ path: CGPath) {
293+
fatalError("TODO")
294+
}
295+
296+
init(_ mutablePath: CGMutablePath) {
297+
fatalError("TODO")
298+
}
299+
300+
// FIXME
301+
@usableFromInline
302+
package static func == (lhs: Path.PathBox, rhs: Path.PathBox) -> Bool {
303+
lhs.kind == rhs.kind
304+
}
305+
#elseif OPENSWIFTUI_RELEASE_2021
292306
let cgPath: CGMutablePath
293307
var bounds: UnsafeAtomicLazy<CGRect>
294308

@@ -328,7 +342,7 @@ extension Path {
328342
private func clearCache() {
329343
bounds.cache = nil
330344
}
331-
// #endif
345+
#endif
332346
}
333347
}
334348

Tests/OpenSwiftUICoreTests/Data/Other/2021/LockedPointerTests.swift

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
// Created by Kyle on 2023/10/19.
66
//
77

8+
#if OPENSWIFTUI_RELEASE_2021
9+
810
@testable import OpenSwiftUICore
911
import COpenSwiftUICore
1012
import Testing

0 commit comments

Comments
 (0)