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 361d49a commit 8269bdeCopy full SHA for 8269bde
lib/AST/Decl.cpp
@@ -7858,16 +7858,7 @@ ParamDecl *ParamDecl::createImplicit(ASTContext &Context,
7858
7859
/// Retrieve the type of 'self' for the given context.
7860
Type DeclContext::getSelfTypeInContext() const {
7861
- assert(isTypeContext());
7862
-
7863
- // For a protocol or extension thereof, the type is 'Self'.
7864
- if (getSelfProtocolDecl()) {
7865
- auto selfType = getProtocolSelfType();
7866
- if (!selfType)
7867
- return ErrorType::get(getASTContext());
7868
- return mapTypeIntoContext(selfType);
7869
- }
7870
- return getDeclaredTypeInContext();
+ return mapTypeIntoContext(getSelfInterfaceType());
7871
}
7872
7873
TupleType *BuiltinTupleDecl::getTupleSelfType() const {
0 commit comments