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 bde6a46 commit 3b8cfcaCopy full SHA for 3b8cfca
lib/AST/Decl.cpp
@@ -3088,9 +3088,7 @@ TypeRepr *ValueDecl::getResultTypeRepr() const {
3088
}
3089
3090
TypeRepr *ValueDecl::getOpaqueResultTypeRepr() const {
3091
- TypeRepr *returnRepr = nullptr;
3092
-
3093
- returnRepr = this->getResultTypeRepr();
+ auto *returnRepr = this->getResultTypeRepr();
3094
3095
auto *dc = getDeclContext();
3096
auto &ctx = dc->getASTContext();
test/type/implicit_some/opaque_return.swift
@@ -115,3 +115,13 @@ struct S: P {
115
116
var asExistential: any P { self }
117
118
+
119
+enum E {
120
+ func f() -> Int {
121
+ 1
122
+ }
123
+}
124
125
+protocol Q {
126
+ func f() -> Int
127
0 commit comments