@@ -3237,62 +3237,18 @@ class ConstraintSystem {
3237
3237
// / Gets the VarDecl associateed with resolvedOverload, and the type of the
3238
3238
// / storage wrapper if the decl has an associated storage wrapper.
3239
3239
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);
3257
3241
3258
3242
// / Gets the VarDecl associateed with resolvedOverload, and the type of the
3259
3243
// / backing storage if the decl has an associated property wrapper.
3260
3244
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);
3276
3246
3277
3247
// / Gets the VarDecl, and the type of the type property that it wraps if
3278
3248
// / resolved overload has a decl which is the backing storage for a
3279
3249
// / property wrapper.
3280
3250
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);
3296
3252
3297
3253
// / Merge the equivalence sets of the two type variables.
3298
3254
// /
0 commit comments