Skip to content

Commit b85bf55

Browse files
committed
[NFC] Add SE-0293 to CHANGELOG.md
1 parent a11e245 commit b85bf55

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,36 @@ CHANGELOG
2929
Swift 5.5
3030
---------
3131

32+
* [SE-0293][]:
33+
34+
Property wrappers can now be applied to function and closure parameters:
35+
36+
```swift
37+
@propertyWrapper
38+
struct Wrapper<Value> {
39+
var wrappedValue: Value
40+
41+
var projectedValue: Self { return self }
42+
43+
init(wrappedValue: Value) { ... }
44+
45+
init(projectedValue: Self) { ... }
46+
}
47+
48+
func test(@Wrapper value: Int) {
49+
print(value)
50+
print($value)
51+
print(_value)
52+
}
53+
54+
test(value: 10)
55+
56+
let projection = Wrapper(wrappedValue: 10)
57+
test($value: projection)
58+
```
59+
60+
The call-site can pass a wrapped value or a projected value, and the property wrapper will be initialized using `init(wrappedValue:)` or `init(projectedValue:)`, respectively.
61+
3262
* [SE-0299][]:
3363

3464
It is now possible to use leading-dot syntax in generic contexts to access static members of protocol extensions where `Self` is constrained to a fully concrete type:

0 commit comments

Comments
 (0)