File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -828,6 +828,8 @@ class MethodBodyScope final : public AbstractFunctionBodyScope {
828
828
public:
829
829
MethodBodyScope (AbstractFunctionDecl *e) : AbstractFunctionBodyScope(e) {}
830
830
std::string getClassName () const override ;
831
+ bool lookupLocalBindings (Optional<bool >,
832
+ DeclConsumer consumer) const override ;
831
833
832
834
protected:
833
835
NullablePtr<DeclContext>
Original file line number Diff line number Diff line change @@ -377,16 +377,22 @@ bool AbstractFunctionBodyScope::lookupLocalBindings(
377
377
isCascadingUse))
378
378
return true ;
379
379
}
380
- if (auto *s = decl->getImplicitSelfDecl ()) {
381
- if (consumer.consume ({s}, DeclVisibilityKind::FunctionParameter,
382
- isCascadingUse))
383
- return true ;
384
- }
385
380
return false ;
386
381
}
387
382
383
+ bool MethodBodyScope::lookupLocalBindings (Optional<bool > isCascadingUse,
384
+ DeclConsumer consumer) const {
385
+ assert (decl->getImplicitSelfDecl ());
386
+ if (AbstractFunctionBodyScope::lookupLocalBindings (isCascadingUse, consumer))
387
+ return true ;
388
+ return consumer.consume ({decl->getImplicitSelfDecl ()},
389
+ DeclVisibilityKind::FunctionParameter,
390
+ isCascadingUse);
391
+ }
392
+
388
393
bool PureFunctionBodyScope::lookupLocalBindings (Optional<bool > isCascadingUse,
389
394
DeclConsumer consumer) const {
395
+ assert (!decl->getImplicitSelfDecl ());
390
396
if (AbstractFunctionBodyScope::lookupLocalBindings (isCascadingUse, consumer))
391
397
return true ;
392
398
You can’t perform that action at this time.
0 commit comments