mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CSClosure] SE-0326: Type-checker statement conditions individually
Instead of referencing whole statement condition, break it down to individual elements and solve them separately. Resolves: rdar://88720312
This commit is contained in:
committed by
Pavel Yaskevich
parent
3efcebf830
commit
0cc8bc7928
@@ -6050,8 +6050,8 @@ SourceLoc constraints::getLoc(ASTNode anchor) {
|
||||
return S->getStartLoc();
|
||||
} else if (auto *P = anchor.dyn_cast<Pattern *>()) {
|
||||
return P->getLoc();
|
||||
} else if (auto *C = anchor.dyn_cast<StmtCondition *>()) {
|
||||
return C->front().getStartLoc();
|
||||
} else if (auto *C = anchor.dyn_cast<StmtConditionElement *>()) {
|
||||
return C->getStartLoc();
|
||||
} else {
|
||||
auto *I = anchor.get<CaseLabelItem *>();
|
||||
return I->getStartLoc();
|
||||
|
||||
Reference in New Issue
Block a user