File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -2223,8 +2223,10 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2223
2223
.fixItRemove (attr->getRange ());
2224
2224
}
2225
2225
}
2226
- }
2227
2226
2227
+ if (VD->getAttrs ().hasAttribute <DynamicReplacementAttr>())
2228
+ TC.checkDynamicReplacementAttribute (VD);
2229
+ }
2228
2230
2229
2231
void visitBoundVars (Pattern *P) {
2230
2232
P->forEachVariable ([&] (VarDecl *VD) { this ->visitBoundVariable (VD); });
@@ -2845,12 +2847,6 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2845
2847
void visitVarDecl (VarDecl *VD) {
2846
2848
// Delay type-checking on VarDecls until we see the corresponding
2847
2849
// PatternBindingDecl.
2848
-
2849
- // Except if there is a dynamic replacement attribute.
2850
- if (VD->getAttrs ().hasAttribute <DynamicReplacementAttr>()) {
2851
- TC.validateDecl (VD);
2852
- TC.checkDynamicReplacementAttribute (VD);
2853
- }
2854
2850
}
2855
2851
2856
2852
// / Determine whether the given declaration requires a definition.
You can’t perform that action at this time.
0 commit comments