File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
validation-test/Serialization/AllowErrors Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -3933,6 +3933,9 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
39333933 using namespace decls_block ;
39343934 verifyAttrSerializable (dtor);
39353935
3936+ if (S.allowCompilerErrors () && dtor->isInvalid ())
3937+ return ;
3938+
39363939 auto contextID = S.addDeclContextRef (dtor->getDeclContext ());
39373940
39383941 unsigned abbrCode = S.DeclTypeAbbrCodes [DestructorLayout::Code];
Original file line number Diff line number Diff line change 1+ // RUN: %empty-directory(%t)
2+
3+ // RUN: %target-swift-frontend -module-name errors -emit-module -o %t/errors.swiftmodule -experimental-allow-module-with-compiler-errors %s
4+
5+ // deinit is only valid on a class, make sure we don't crash when allowing
6+ // errors
7+
8+ deinit { }
You can’t perform that action at this time.
0 commit comments