Skip to content

Commit 147bfd7

Browse files
committed
stdlib: make Array.count an array semantic function
So far the semantic annotation was just added to the internal `_getCount` function. But for FixedArray it is also required to add the `@_semantics("array.get_count")` to the public API.
1 parent 1cda26b commit 147bfd7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stdlib/public/core/Array.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@ extension Array: RandomAccessCollection, MutableCollection {
806806

807807
/// The number of elements in the array.
808808
@inlinable
809+
@_semantics("array.get_count")
809810
public var count: Int {
810811
return _getCount()
811812
}

0 commit comments

Comments
 (0)