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> {
3933
3933
using namespace decls_block ;
3934
3934
verifyAttrSerializable (dtor);
3935
3935
3936
+ if (S.allowCompilerErrors () && dtor->isInvalid ())
3937
+ return ;
3938
+
3936
3939
auto contextID = S.addDeclContextRef (dtor->getDeclContext ());
3937
3940
3938
3941
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