@@ -3237,62 +3237,18 @@ class ConstraintSystem {
32373237 // / Gets the VarDecl associateed with resolvedOverload, and the type of the
32383238 // / storage wrapper if the decl has an associated storage wrapper.
32393239 Optional<std::pair<VarDecl *, Type>>
3240- getStorageWrapperInformation (SelectedOverload resolvedOverload) {
3241- if (resolvedOverload.choice .isDecl ()) {
3242- if (auto *decl = dyn_cast<VarDecl>(resolvedOverload.choice .getDecl ())) {
3243- if (decl->hasAttachedPropertyWrapper ()) {
3244- if (auto storageWrapper = decl->getPropertyWrapperStorageWrapper ()) {
3245- Type type = storageWrapper->getInterfaceType ();
3246- if (Type baseType = resolvedOverload.choice .getBaseType ()) {
3247- type = baseType->getTypeOfMember (DC->getParentModule (),
3248- storageWrapper, type);
3249- }
3250- return std::make_pair (decl, type);
3251- }
3252- }
3253- }
3254- }
3255- return None;
3256- }
3240+ getStorageWrapperInformation (SelectedOverload resolvedOverload);
32573241
32583242 // / Gets the VarDecl associateed with resolvedOverload, and the type of the
32593243 // / backing storage if the decl has an associated property wrapper.
32603244 Optional<std::pair<VarDecl *, Type>>
3261- getPropertyWrapperInformation (SelectedOverload resolvedOverload) {
3262- if (resolvedOverload.choice .isDecl ()) {
3263- if (auto *decl = dyn_cast<VarDecl>(resolvedOverload.choice .getDecl ())) {
3264- if (decl->hasAttachedPropertyWrapper ()) {
3265- auto wrapperTy = decl->getPropertyWrapperBackingPropertyType ();
3266- if (Type baseType = resolvedOverload.choice .getBaseType ()) {
3267- wrapperTy = baseType->getTypeOfMember (DC->getParentModule (),
3268- decl, wrapperTy);
3269- }
3270- return std::make_pair (decl, wrapperTy);
3271- }
3272- }
3273- }
3274- return None;
3275- }
3245+ getPropertyWrapperInformation (SelectedOverload resolvedOverload);
32763246
32773247 // / Gets the VarDecl, and the type of the type property that it wraps if
32783248 // / resolved overload has a decl which is the backing storage for a
32793249 // / property wrapper.
32803250 Optional<std::pair<VarDecl *, Type>>
3281- getWrappedPropertyInformation (SelectedOverload resolvedOverload) {
3282- if (resolvedOverload.choice .isDecl ()) {
3283- if (auto *decl = dyn_cast<VarDecl>(resolvedOverload.choice .getDecl ())) {
3284- if (auto wrapped = decl->getOriginalWrappedProperty ()) {
3285- Type type = wrapped->getInterfaceType ();
3286- if (Type baseType = resolvedOverload.choice .getBaseType ()) {
3287- type = baseType->getTypeOfMember (DC->getParentModule (),
3288- wrapped, type);
3289- }
3290- return std::make_pair (decl, type);
3291- }
3292- }
3293- }
3294- return None;
3295- }
3251+ getWrappedPropertyInformation (SelectedOverload resolvedOverload);
32963252
32973253 // / Merge the equivalence sets of the two type variables.
32983254 // /
0 commit comments