Skip to content

Commit 212c89d

Browse files
committed
[AutoDiff] NFC: add clarifying comments to test.
1 parent 7a238c6 commit 212c89d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/AutoDiff/validation-test/property_wrappers.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ PropertyWrapperTests.test("SimpleClass") {
141141
*/
142142

143143
// From: https://github.com/apple/swift-evolution/blob/master/proposals/0258-property-wrappers.md#proposed-solution
144+
// Tests the following functionality:
145+
// - Enum property wrapper.
144146
@propertyWrapper
145147
enum Lazy<Value> {
146148
case uninitialized(() -> Value)
@@ -151,10 +153,13 @@ enum Lazy<Value> {
151153
}
152154

153155
var wrappedValue: Value {
156+
// TODO(TF-1250): Replace with actual mutating getter implementation.
157+
// Requires differentiation to support functions with multiple results.
154158
get {
155159
switch self {
156160
case .uninitialized(let initializer):
157161
let value = initializer()
162+
// NOTE: Actual implementation assigns to `self` here.
158163
return value
159164
case .initialized(let value):
160165
return value

0 commit comments

Comments
 (0)