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 a10194c commit c8a60c8Copy full SHA for c8a60c8
lib/Sema/TypeCheckStorage.cpp
@@ -515,8 +515,14 @@ const PatternBindingEntry *PatternBindingEntryRequest::evaluate(
515
}
516
517
auto supportsInitialization = [&] {
518
- auto *var = binding->getSingleVar();
519
- return var && var->supportsInitialization();
+ bool anySupportsInitialization = false;
+ pattern->forEachVariable([&](VarDecl *var) {
520
+ if (var->supportsInitialization()) {
521
+ anySupportsInitialization = true;
522
+ }
523
+ });
524
+
525
+ return anySupportsInitialization;
526
};
527
528
// If we have a type but no initializer, check whether the type is
0 commit comments