mirror of
https://github.com/apple/swift-collections
synced 2026-11-22 04:20:40 +00:00
The `Storage` classes in HashTreeCollections and SortedCollections mark their `deinit` as `@inlinable` but lack `@_fixed_layout`. Under library evolution (BUILD_LIBRARY_FOR_DISTRIBUTION=YES), Swift 6.2+ rejects this with "deinitializer can only be '@inlinable' if the class is '@_fixed_layout'", because inlining a deinit requires a known layout that resilient mode deliberately hides. This mirrors the existing fix already applied to the equivalent storage classes in DequeModule (_DequeBuffer) and RopeModule (Rope._Storage). As noted there, this does not make anything ABI stable -- these storage classes are @usableFromInline internal and never part of the public ABI surface -- it only lets these modules build with library evolution enabled. Fixes #676. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>