@@ -3080,62 +3080,18 @@ class ConstraintSystem {
3080
3080
// / Gets the VarDecl associateed with resolvedOverload, and the type of the
3081
3081
// / storage wrapper if the decl has an associated storage wrapper.
3082
3082
Optional<std::pair<VarDecl *, Type>>
3083
- getStorageWrapperInformation (SelectedOverload resolvedOverload) {
3084
- if (resolvedOverload.choice .isDecl ()) {
3085
- if (auto *decl = dyn_cast<VarDecl>(resolvedOverload.choice .getDecl ())) {
3086
- if (decl->hasAttachedPropertyWrapper ()) {
3087
- if (auto storageWrapper = decl->getPropertyWrapperStorageWrapper ()) {
3088
- Type type = storageWrapper->getInterfaceType ();
3089
- if (Type baseType = resolvedOverload.choice .getBaseType ()) {
3090
- type = baseType->getTypeOfMember (DC->getParentModule (),
3091
- storageWrapper, type);
3092
- }
3093
- return std::make_pair (decl, type);
3094
- }
3095
- }
3096
- }
3097
- }
3098
- return None;
3099
- }
3083
+ getStorageWrapperInformation (SelectedOverload resolvedOverload);
3100
3084
3101
3085
// / Gets the VarDecl associateed with resolvedOverload, and the type of the
3102
3086
// / backing storage if the decl has an associated property wrapper.
3103
3087
Optional<std::pair<VarDecl *, Type>>
3104
- getPropertyWrapperInformation (SelectedOverload resolvedOverload) {
3105
- if (resolvedOverload.choice .isDecl ()) {
3106
- if (auto *decl = dyn_cast<VarDecl>(resolvedOverload.choice .getDecl ())) {
3107
- if (decl->hasAttachedPropertyWrapper ()) {
3108
- auto wrapperTy = decl->getPropertyWrapperBackingPropertyType ();
3109
- if (Type baseType = resolvedOverload.choice .getBaseType ()) {
3110
- wrapperTy = baseType->getTypeOfMember (DC->getParentModule (),
3111
- decl, wrapperTy);
3112
- }
3113
- return std::make_pair (decl, wrapperTy);
3114
- }
3115
- }
3116
- }
3117
- return None;
3118
- }
3088
+ getPropertyWrapperInformation (SelectedOverload resolvedOverload);
3119
3089
3120
3090
// / Gets the VarDecl, and the type of the type property that it wraps if
3121
3091
// / resolved overload has a decl which is the backing storage for a
3122
3092
// / property wrapper.
3123
3093
Optional<std::pair<VarDecl *, Type>>
3124
- getWrappedPropertyInformation (SelectedOverload resolvedOverload) {
3125
- if (resolvedOverload.choice .isDecl ()) {
3126
- if (auto *decl = dyn_cast<VarDecl>(resolvedOverload.choice .getDecl ())) {
3127
- if (auto wrapped = decl->getOriginalWrappedProperty ()) {
3128
- Type type = wrapped->getInterfaceType ();
3129
- if (Type baseType = resolvedOverload.choice .getBaseType ()) {
3130
- type = baseType->getTypeOfMember (DC->getParentModule (),
3131
- wrapped, type);
3132
- }
3133
- return std::make_pair (decl, type);
3134
- }
3135
- }
3136
- }
3137
- return None;
3138
- }
3094
+ getWrappedPropertyInformation (SelectedOverload resolvedOverload);
3139
3095
3140
3096
// / Merge the equivalence sets of the two type variables.
3141
3097
// /
0 commit comments