Skip to content

Commit c19d6e8

Browse files
committed
Update package
1 parent 9a05c0f commit c19d6e8

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

Dependencies/Engine/EngineCore/ProtocolConformance.swift

+3-7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Copyright (c) Nathan Tannar
33
//
44

5+
import Swallow
6+
57
/// A type that wraps the conformance of protocol `P` for a given type.
68
///
79
/// See also:
@@ -14,7 +16,7 @@ public struct ProtocolConformance<P: TypeDescriptor> {
1416
public init?(_ type: Any.Type) {
1517
let metadata = unsafeBitCast(type, to: UnsafeRawPointer.self)
1618
let desc = P.descriptor
17-
guard let conformance = swift_conformsToProtocol(metadata, desc) else {
19+
guard let conformance = _swift_conformsToProtocol(metadata, desc) else {
1820
return nil
1921
}
2022
self.metadata = metadata
@@ -39,9 +41,3 @@ extension TypeDescriptor {
3941
return ProtocolConformance(type)
4042
}
4143
}
42-
43-
@_silgen_name("swift_conformsToProtocol")
44-
func swift_conformsToProtocol(
45-
_ type: UnsafeRawPointer,
46-
_ descriptor: UnsafeRawPointer
47-
) -> UnsafeRawPointer?

Sources/_SwiftUIZ_A/Intramodular/Dynamic Properties/_ConstantOrBinding.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//
44

55
import Swallow
6+
import SwallowMacrosClient
67
import SwiftUI
78

89
@dynamicMemberLookup
@@ -49,7 +50,7 @@ public struct _ConstantOrBinding<Value>: _SwiftUIZ_DynamicProperty {
4950
public var binding: any _SwiftUIX_BindingType<Value> {
5051
get throws {
5152
guard case .binding(let binding) = base else {
52-
throw _PlaceholderError()
53+
#throw
5354
}
5455

5556
return binding

Sources/_SwiftUIZ_A/Intramodular/Scenes/_DynamicSceneInitializer.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ public enum _DynamicSceneInitializers {
153153
}
154154

155155
try _warnOnThrow {
156-
try _tryAssert(parameters.idType == nil)
157-
try _tryAssert(parameters.id == nil)
156+
try #assert(parameters.idType == nil)
157+
try #assert(parameters.id == nil)
158158
}
159159

160160
guard let value = parameters.value as? Value else {

Sources/_SwiftUIZ_A/Intramodular/Scenes/_SwiftUIZ_Scene.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//
44

55
import Swallow
6+
import SwallowMacrosClient
67
import SwiftUI
78

89
@MainActor
@@ -49,7 +50,7 @@ extension _SwiftUIZ_Scene {
4950
} else if let body = body as? _DonateDynamicSceneInitializer {
5051
return body._resolve()
5152
} else {
52-
throw _PlaceholderError()
53+
#throw
5354
}
5455
}
5556
}

0 commit comments

Comments
 (0)