Skip to content

Commit 4032cd8

Browse files
committed
Rename CustomAttrTypeKind::PropertyDelegate to PropertyWrapper.
1 parent dee5356 commit 4032cd8

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

include/swift/AST/TypeCheckRequests.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2693,9 +2693,9 @@ enum class CustomAttrTypeKind {
26932693
/// any contextual type parameters.
26942694
NonGeneric,
26952695

2696-
/// Property delegates have some funky rules, like allowing
2696+
/// Property wrappers have some funky rules, like allowing
26972697
/// unbound generic types.
2698-
PropertyDelegate,
2698+
PropertyWrapper,
26992699

27002700
/// Global actors are represented as custom type attributes. They don't
27012701
/// have any particularly interesting semantics.

lib/AST/TypeCheckRequests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,8 +1427,8 @@ void swift::simple_display(llvm::raw_ostream &out, CustomAttrTypeKind value) {
14271427
out << "non-generic";
14281428
return;
14291429

1430-
case CustomAttrTypeKind::PropertyDelegate:
1431-
out << "property-delegate";
1430+
case CustomAttrTypeKind::PropertyWrapper:
1431+
out << "property-wrapper";
14321432
return;
14331433

14341434
case CustomAttrTypeKind::GlobalActor:

lib/Sema/TypeCheckPropertyWrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ Type AttachedPropertyWrapperTypeRequest::evaluate(Evaluator &evaluator,
513513
auto ty = evaluateOrDefault(
514514
evaluator,
515515
CustomAttrTypeRequest{customAttr, var->getDeclContext(),
516-
CustomAttrTypeKind::PropertyDelegate},
516+
CustomAttrTypeKind::PropertyWrapper},
517517
Type());
518518
if (!ty || ty->hasError()) {
519519
return ErrorType::get(var->getASTContext());

lib/Sema/TypeCheckType.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3974,7 +3974,7 @@ Type CustomAttrTypeRequest::evaluate(Evaluator &eval, CustomAttr *attr,
39743974

39753975
OpenUnboundGenericTypeFn unboundTyOpener = nullptr;
39763976
// Property delegates allow their type to be an unbound generic.
3977-
if (typeKind == CustomAttrTypeKind::PropertyDelegate) {
3977+
if (typeKind == CustomAttrTypeKind::PropertyWrapper) {
39783978
unboundTyOpener = [](auto unboundTy) {
39793979
// FIXME: Don't let unbound generic types
39803980
// escape type resolution. For now, just

0 commit comments

Comments
 (0)