Skip to content

Commit 6f7f8fd

Browse files
Mark TextualNamespace as @Frozen (#59)
@inlinable public init(_ base: Base) { self.base = base } fails under -enable-library-evolution because the let property's layout is resilient. Marking the wrapper struct @Frozen freezes its layout, which is sound for a transparent single-property wrapper and unlocks library-evolution consumers (e.g. modules built with BUILD_LIBRARY_FOR_DISTRIBUTION=YES).
1 parent 1ee87bd commit 6f7f8fd

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Sources/Textual/TextualNamespace.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import Foundation
1717
///
1818
/// SwiftUI views get the namespace through the ``SwiftUICore/View/textual`` property.
1919
/// Other types can opt into it by conforming to ``TextualCompatible``.
20+
@frozen
2021
public struct TextualNamespace<Base> {
2122
@usableFromInline let base: Base
2223
@inlinable public init(_ base: Base) { self.base = base }

0 commit comments

Comments
 (0)