File tree Expand file tree Collapse file tree 2 files changed +25
-14
lines changed
branches/rxwei-patch-1/lib/Sema Expand file tree Collapse file tree 2 files changed +25
-14
lines changed Original file line number Diff line number Diff line change @@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
1015
1015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
1016
1016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
1017
1017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018
- refs/heads/rxwei-patch-1: c1c4ca5e0a22707986829f9ca6555d9ce7983416
1018
+ refs/heads/rxwei-patch-1: b36f772a6be9d0bbfd6d0252577c4b1af96057dd
1019
1019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
1020
1020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
1021
1021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9
Original file line number Diff line number Diff line change @@ -3353,19 +3353,30 @@ class ArgumentMatcher : public MatchCallArgumentListener {
3353
3353
}
3354
3354
3355
3355
bool isPropertyWrapperImplicitInit () {
3356
- if (auto TE = dyn_cast<TypeExpr>(FnExpr)) {
3357
- if (TE->getInstanceType ()
3358
- ->getAnyNominal ()
3359
- ->getAttrs ()
3360
- .hasAttribute <PropertyWrapperAttr>()) {
3361
- if (auto parent = CandidateInfo.CS .getParentExpr (FnExpr)) {
3362
- if (auto CE = dyn_cast<CallExpr>(parent)) {
3363
- return CE->isImplicit ();
3364
- }
3365
- }
3366
- }
3367
- }
3368
- return false ;
3356
+ auto TE = dyn_cast<TypeExpr>(FnExpr);
3357
+ if (!TE)
3358
+ return false ;
3359
+
3360
+ auto instanceTy = TE->getInstanceType ();
3361
+ if (!instanceTy)
3362
+ return false ;
3363
+
3364
+ auto nominalDecl = instanceTy->getAnyNominal ();
3365
+ if (!nominalDecl)
3366
+ return false ;
3367
+
3368
+ if (!nominalDecl->getAttrs ().hasAttribute <PropertyWrapperAttr>())
3369
+ return false ;
3370
+
3371
+ auto parent = CandidateInfo.CS .getParentExpr (FnExpr);
3372
+ if (!parent)
3373
+ return false ;
3374
+
3375
+ auto CE = dyn_cast<CallExpr>(parent);
3376
+ if (!CE)
3377
+ return false ;
3378
+
3379
+ return CE->isImplicit ();
3369
3380
}
3370
3381
3371
3382
bool missingLabel (unsigned paramIdx) override {
You can’t perform that action at this time.
0 commit comments