File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -5273,6 +5273,11 @@ void Serializer::writeAST(ModuleOrSourceFile DC) {
5273
5273
}
5274
5274
5275
5275
for (auto OTD : opaqueReturnTypeDecls) {
5276
+ // FIXME: We should delay parsing function bodies so these type decls
5277
+ // don't even get added to the file.
5278
+ if (OTD->getDeclContext ()->getInnermostSkippedFunctionContext ())
5279
+ continue ;
5280
+
5276
5281
hasOpaqueReturnTypes = true ;
5277
5282
Mangle::ASTMangler Mangler;
5278
5283
auto MangledName = Mangler.mangleOpaqueTypeDecl (OTD);
Original file line number Diff line number Diff line change
1
+ // RUN: %target-build-swift -Xfrontend -disable-availability-checking -emit-module -module-name A -Xfrontend -experimental-skip-all-function-bodies -Xfrontend -debug-forbid-typecheck-prefix -Xfrontend NEVERTYPECHECK %s
2
+ // RUN: %target-build-swift -Xfrontend -disable-availability-checking -emit-module -module-name A -Xfrontend -experimental-skip-non-inlinable-function-bodies -Xfrontend -debug-forbid-typecheck-prefix -Xfrontend NEVERTYPECHECK %s
3
+
4
+ protocol Base {
5
+ func anything( )
6
+ }
7
+
8
+ func test( ) {
9
+ struct Nested : Base {
10
+ let NEVERTYPECHECK_property = 1
11
+
12
+ func anything( ) {
13
+ let NEVERTYPECHECK_local = 1
14
+ }
15
+
16
+ func opaqueReturnType( ) -> some Base {
17
+ let NEVERTYPECHECK_local = 1
18
+ return Nested ( )
19
+ }
20
+ }
21
+ }
You can’t perform that action at this time.
0 commit comments