Skip to content

Commit

Permalink
Rename CustomAttrTypeKind::PropertyDelegate to PropertyWrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
DougGregor committed Oct 14, 2020
1 parent dee5356 commit 4032cd8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/swift/AST/TypeCheckRequests.h
Original file line number Diff line number Diff line change
Expand Up @@ -2693,9 +2693,9 @@ enum class CustomAttrTypeKind {
/// any contextual type parameters.
NonGeneric,

/// Property delegates have some funky rules, like allowing
/// Property wrappers have some funky rules, like allowing
/// unbound generic types.
PropertyDelegate,
PropertyWrapper,

/// Global actors are represented as custom type attributes. They don't
/// have any particularly interesting semantics.
Expand Down
4 changes: 2 additions & 2 deletions lib/AST/TypeCheckRequests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1427,8 +1427,8 @@ void swift::simple_display(llvm::raw_ostream &out, CustomAttrTypeKind value) {
out << "non-generic";
return;

case CustomAttrTypeKind::PropertyDelegate:
out << "property-delegate";
case CustomAttrTypeKind::PropertyWrapper:
out << "property-wrapper";
return;

case CustomAttrTypeKind::GlobalActor:
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/TypeCheckPropertyWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ Type AttachedPropertyWrapperTypeRequest::evaluate(Evaluator &evaluator,
auto ty = evaluateOrDefault(
evaluator,
CustomAttrTypeRequest{customAttr, var->getDeclContext(),
CustomAttrTypeKind::PropertyDelegate},
CustomAttrTypeKind::PropertyWrapper},
Type());
if (!ty || ty->hasError()) {
return ErrorType::get(var->getASTContext());
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/TypeCheckType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3974,7 +3974,7 @@ Type CustomAttrTypeRequest::evaluate(Evaluator &eval, CustomAttr *attr,

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

0 comments on commit 4032cd8

Please sign in to comment.