Skip to content

Commit c36683f

Browse files
committed
[SE-0258] Add @propertyDelegate and @propertyWrapper aliases
Fixes rdar://problem/51591955.
1 parent 0a1b18f commit c36683f

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

include/swift/AST/Attr.def

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,8 @@ DECL_ATTR(_custom, Custom,
404404
SIMPLE_DECL_ATTR(_propertyWrapper, PropertyWrapper,
405405
OnStruct | OnClass | OnEnum,
406406
86)
407+
DECL_ATTR_ALIAS(propertyDelegate, PropertyWrapper)
408+
DECL_ATTR_ALIAS(propertyWrapper, PropertyWrapper)
407409
SIMPLE_DECL_ATTR(_disfavoredOverload, DisfavoredOverload,
408410
OnAbstractFunction | OnVar | OnSubscript | UserInaccessible,
409411
87)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// RUN: %target-typecheck-verify-swift
2+
3+
// expect-no-diagnostics
4+
5+
@propertyDelegate
6+
struct Delegate<T> {
7+
var value: T
8+
}
9+
10+
@propertyWrapper
11+
struct Wrapper<T> {
12+
var value: T
13+
}

0 commit comments

Comments
 (0)