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 @@ -3913,6 +3913,9 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
3913
3913
using namespace decls_block ;
3914
3914
verifyAttrSerializable (dtor);
3915
3915
3916
+ if (S.allowCompilerErrors () && dtor->isInvalid ())
3917
+ return ;
3918
+
3916
3919
auto contextID = S.addDeclContextRef (dtor->getDeclContext ());
3917
3920
3918
3921
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