Skip to content

Commit da1b7a2

Browse files
committed
Update for new rules on @inline(__always) function bodies
Referencing private or internal declarations from an @inline(__always) body can lead to SIL verifier and linker failures, so now we diagnose and prohibit it. Mark the entity in question public, or if it is not part of user-visible API, internal and @_versioned. See <swiftlang/swift#6669>.
1 parent c41f353 commit da1b7a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/Data.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
911911
public typealias Index = Int
912912
public typealias Indices = CountableRange<Int>
913913

914-
internal var _backing : _DataStorage
914+
@_versioned internal var _backing : _DataStorage
915915

916916
// A standard or custom deallocator for `Data`.
917917
///

0 commit comments

Comments
 (0)