mirror of
https://github.com/apple/swift-collections
synced 2026-11-25 04:37:48 +00:00
[HashTreeCollections] Avoid parsing issue with func read
When the BorrowAndMutateAccessors feature is enabled, this code appears to be parsed as if it declared a `read` accessor, rather than a getter passing a closure to the `read` function:
```swift
@inlinable
internal var collisionHash: _Hash {
read { $0.collisionHash }
}
```
Avoid this by adding a `self` prefix, as in `self.read { $0.collisionHash }`.
This commit is contained in:
2 files changed
+6
-6
No files matched your search
@@ -103,27 +103,27 @@ extension _HashNode {
|
||||
extension _HashNode {
|
||||
@inlinable
|
||||
internal var isCollisionNode: Bool {
|
||||
read { $0.isCollisionNode }
|
||||
self.read { $0.isCollisionNode }
|
||||
}
|
||||
|
||||
@inlinable
|
||||
internal var collisionHash: _Hash {
|
||||
read { $0.collisionHash }
|
||||
self.read { $0.collisionHash }
|
||||
}
|
||||
|
||||
@inlinable
|
||||
internal var hasSingletonItem: Bool {
|
||||
read { $0.hasSingletonItem }
|
||||
self.read { $0.hasSingletonItem }
|
||||
}
|
||||
|
||||
@inlinable
|
||||
internal var hasSingletonChild: Bool {
|
||||
read { $0.hasSingletonChild }
|
||||
self.read { $0.hasSingletonChild }
|
||||
}
|
||||
|
||||
@inlinable
|
||||
internal var isAtrophied: Bool {
|
||||
read { $0.isAtrophiedNode }
|
||||
self.read { $0.isAtrophiedNode }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user