Skip to content

Commit 57abdc1

Browse files
committed
[SE-0258] value -> wrappedValue cleanups, toolchain links
1 parent 5fa31ee commit 57abdc1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

proposals/0258-property-wrappers.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Authors: [Doug Gregor](https://github.com/DougGregor), [Joe Groff](https://github.com/jckarter)
55
* Review Manager: [John McCall](https://github.com/rjmccall)
66
* Status: **Active Review (June 14th...24th, 2019)**
7-
* Implementation: Available in [master snapshots](https://swift.org/download/#snapshots).
7+
* Implementation: [Linux toolchain](https://ci.swift.org/job/swift-PR-toolchain-Linux/243//artifact/branch-master/swift-PR-25464-243-ubuntu16.04.tar.gz), [macOS toolchain](https://ci.swift.org/job/swift-PR-toolchain-osx/317//artifact/branch-master/swift-PR-25464-317-osx.tar.gz), and [master or 5.1 snapshots](https://swift.org/download/#snapshots) after June 14, 2019.
88
* Review: ([review #1](https://forums.swift.org/t/se-0258-property-delegates/23139)) ([revision announcement #1](https://forums.swift.org/t/returned-for-revision-se-0258-property-delegates/24080)) ([review #2](https://forums.swift.org/t/se-0258-property-wrappers-second-review/25843))
99
* Previous versions: [Revision #1](https://github.com/apple/swift-evolution/commit/8c3499ec5bc22713b150e2234516af3cb8b16a0b)
1010

@@ -478,8 +478,8 @@ struct Ref<Value> {
478478

479479
subscript<U>(dynamicMember keyPath: WritableKeyPath<Value, U>) -> Ref<U> {
480480
return Ref<U>(
481-
read: { self.value[keyPath: keyPath] },
482-
write: { self.value[keyPath: keyPath] = $0 })
481+
read: { self.wrappedValue[keyPath: keyPath] },
482+
write: { self.wrappedValue[keyPath: keyPath] = $0 })
483483
}
484484
}
485485
```
@@ -507,11 +507,11 @@ class Box<Value> {
507507
var wrappedValue: Value
508508

509509
init(initialValue: Value) {
510-
self.value = initialValue
510+
self.wrappedValue = initialValue
511511
}
512512

513513
var wrapperValue: Ref<Value> {
514-
return Ref<Value>(read: { self.value }, write: { self.value = $0 })
514+
return Ref<Value>(read: { self.wrappedValue }, write: { self.wrappedValue = $0 })
515515
}
516516
}
517517
```

0 commit comments

Comments
 (0)