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 1ead8ea commit 337edbeCopy full SHA for 337edbe
lib/ClangImporter/ImportDecl.cpp
@@ -4109,8 +4109,9 @@ namespace {
4109
// If the method has a related result type that is representable
4110
// in Swift as DynamicSelf, do so.
4111
if (!prop && decl->hasRelatedResultType()) {
4112
- resultTy = DynamicSelfType::get(dc->getSelfInterfaceType(),
4113
- Impl.SwiftContext);
+ resultTy = dc->getSelfInterfaceType();
+ if (dc->getSelfClassDecl())
4114
+ resultTy = DynamicSelfType::get(resultTy, Impl.SwiftContext);
4115
isIUO = false;
4116
4117
OptionalTypeKind nullability = OTK_ImplicitlyUnwrappedOptional;
0 commit comments