We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b04d5d5 commit f9879b1Copy full SHA for f9879b1
lib/AST/ASTBridging.cpp
@@ -563,6 +563,15 @@ static void setParsedMembers(IterableDeclContext *IDC,
563
SmallVector<Decl *> members;
564
for (auto *decl : bridgedMembers.unbridged<Decl *>()) {
565
members.push_back(decl);
566
+
567
+ // Add any variables bound to the list of decls.
568
+ if (auto *PBD = dyn_cast<PatternBindingDecl>(decl)) {
569
+ for (auto idx : range(PBD->getNumPatternEntries())) {
570
+ PBD->getPattern(idx)->forEachVariable([&](VarDecl *VD) {
571
+ members.push_back(VD);
572
+ });
573
+ }
574
575
// Each enum case element is also part of the members list according to the
576
// legacy parser.
577
if (auto *ECD = dyn_cast<EnumCaseDecl>(decl)) {
0 commit comments