File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
validation-test/Serialization/AllowErrors Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -4148,6 +4148,13 @@ class Serializer::TypeSerializer : public TypeVisitor<TypeSerializer> {
4148
4148
}
4149
4149
4150
4150
void visitUnresolvedType (const UnresolvedType *) {
4151
+ // If for some reason we have an unresolved type while compiling with
4152
+ // errors, just serialize an ErrorType and continue.
4153
+ if (S.getASTContext ().LangOpts .AllowModuleWithCompilerErrors ) {
4154
+ visitErrorType (
4155
+ cast<ErrorType>(ErrorType::get (S.getASTContext ()).getPointer ()));
4156
+ return ;
4157
+ }
4151
4158
llvm_unreachable (" should not serialize an UnresolvedType" );
4152
4159
}
4153
4160
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
+ protocol SomeProto { }
6
+
7
+ extension SomeProto {
8
+ func someFunc( arg:
9
+
10
+ enum SomeEnum {
11
+ case a
12
+ }
You can’t perform that action at this time.
0 commit comments