Skip to content

Commit e563296

Browse files
committed
LookupVisibleDecls: Use TypeBase::getMetatypeInstanceType()
1 parent 6e8ae7f commit e563296

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/Sema/LookupVisibleDecls.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -771,16 +771,12 @@ class OverrideFilteringConsumer : public VisibleDeclConsumer {
771771
Type BaseTy;
772772
const DeclContext *DC;
773773
LazyResolver *TypeResolver;
774-
bool IsTypeLookup = false;
775774

776775
OverrideFilteringConsumer(Type BaseTy, const DeclContext *DC,
777776
LazyResolver *resolver)
778-
: BaseTy(BaseTy), DC(DC), TypeResolver(resolver) {
777+
: BaseTy(BaseTy->getMetatypeInstanceType()),
778+
DC(DC), TypeResolver(resolver) {
779779
assert(!BaseTy->hasLValueType());
780-
if (auto *MetaTy = BaseTy->getAs<AnyMetatypeType>()) {
781-
BaseTy = MetaTy->getInstanceType();
782-
IsTypeLookup = true;
783-
}
784780
assert(DC && BaseTy);
785781
}
786782

0 commit comments

Comments
 (0)