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.
typeCheckDecl
1 parent d5e9a39 commit 598b850Copy full SHA for 598b850
lib/Sema/CSClosure.cpp
@@ -894,10 +894,14 @@ class ClosureConstraintApplication
894
// Generate constraints for pattern binding declarations.
895
if (auto patternBinding = dyn_cast<PatternBindingDecl>(decl)) {
896
SolutionApplicationTarget target(patternBinding);
897
- if (!rewriteTarget(target))
+ if (!rewriteTarget(target)) {
898
hadError = true;
899
+ return;
900
+ }
901
- return;
902
+ // Allow `typeCheckDecl` to be called after solution is applied
903
+ // to a pattern binding. That would materialize required
904
+ // information e.g. accessors and do access/availability checks.
905
}
906
907
TypeChecker::typeCheckDecl(decl);
0 commit comments